Skip to main content

Full text of "SoftSide Magazine Issue 35 (Quest 1)"

See other formats


THREE DOLLARS 



k • Your BASIC Software Magazine • NUMBER ELEVEN 



Battlefield 
Shark 

Compu-Sketch 
S-80 Video Reverse 

VARPTR Used 
and much, 

A^much more! 



SoftSide Publications 
welcomes you to... 



THE 



ycx 








A New Generation of Role Playing Adventures 

With all new monsters and treasures never before encountered, The Quest 
for the Arm of St. Elsinore is the premiere module in the World of Beysycx 
series of role playing adventures. 

The World of Beysycx series was created for use with the popular Advanced 
Dungeons & Dragons (tm) gaming system, and is designed as the ultimate in 
DM playing aids. Each module comes with graphic cardboard map pieces and 
two fully illustrated booklets detailing the scenario and showing every monster 
id every treasure. 
Jo order, send $6.95 (plus $1.00 shipping) to: 

SoftSide Publications 
6 South Street 



Milford, NH 03055 



Advanced Dungeons & Dragons ts a 

registered trademark of TSR Hobbies. 



Hot pursuit 
through space 
and the 
vortices 
of time! 





[RE PRESENTS. 



CiltHB to?<l 

The fallen Time Lord, who presumptuously calls himself The Master, is at large. 

The elders of Waldrom have supplied you with the hyperspace-worthy vessel 
TARDIS, and commissioned you to eliminate the evil "Master". Your resources in- 
clude clones who will fight for you, the^formidable CRASER weapons of the TARDIS, 
and magic weapons such as Fusion Grenades and Borelian Matrix Crystals. 

Travelling through hyperspace in search of the evil one, you will encounter Time 
Eaters, Neutron Storms, and other alien creatures and phenomena. Entering real 
space to search planets, you will encounter still other dangers. You will enter native 
settlements to buy food and supplies — or to fight for survival. 

And once you find The Master can you destroy him? 



Based on Dr. Who of PBS fame. 
Apple integer Basic, 
Disl<, 48K . . . $29.95 



-55lt5iae, 



I^^^Rj t//vi 




\OI\S 



6 5outh Street Milford NH 03055 
For Orders Only 603-673-0585 



SoftSide-DV: 
The Magazine that Addresses 

Both of You... 



-55ft5iae, 




loru 



6 5outh Strest Milford NH 03055 
For Orders Only 603-673-0585 



SoftSide, the magazine that for the past three years has brought you and 
your microcomputer the finest in BASIC language software, now offers 
more programs to S-80 disic subscribers, and the software isn't limited to 
BASIC! 

Over 2,000 subscribers have dispensed with the hours of typing by 
receiving our programs for the S-80, Apple, and Atari on disk and cassette 
along with the printed magazine, but convenience is only the beginning for 
the S-80 SoftSide-DV. Now if you subscribe to SoftSide S-80 DV you will 
receive all the programs in the magazine itself and a host of others, 
including Machine Language and hybrid (multiple language) programs that 
we could never print on paper. We will offer complete programs of every 
conceivable type and ongoing data bases. We will venture into totally 
modified languages, new versions of BASIC authored specifically for your 
S-80, and l-$tring programs with new data bases that will allow you to enjoy 
puzzles, games and adventures without having to type them in and thus 
have them half-solved before you ever start! 

If you don't believe we can deliver what we're promising, try us out on a 
one-time basis: a full disk of programs for $19.95 Of course if you 
subscribe, the cost will be substantially less: Until August 31 we will offer a 
full year's subscription to SoftSide-DV for a mere $99.95, that's a $8.33 per 
disk, and you get the magazine to boot! 

For your convenience, we offer an installment plan for IVIastercard and 
Visa card holders: You pay $32.50 per quarter (price includes $5.00 charge 
for the service). For orders outside the U.S.A. please add $18. If you 
currently receive the magazine, we will credit the remainder of your 
subscription to a new SoftSide-DV order. 

All subscribers to S-80 SoftSide-DV will receive a disk full of programs as 
well as SoftSide magazine, guaranteeing you not only the best software for 
your microcomputer, but ttie least expensive as well. It's our way of inviting 
you to step Into the future. 

Atari and Apple DV slated to be enhanced soon. 




TABLE OF CONTENTS 

ARTICLES 

72 Computer Graphics Reflective Symmetry Joan Truckenbrod 

76 Video Reverse Modification s-80 Do it yourself Ed Umlor 

80 Lemonade or Champagne The last round Will Hagenbuch 

84 VARPTR Used Would you buy a used VARPTR from this man? John T. Phillipp, M.D. 

92 Reviews APPL-L-ISP, 3-d Computer Graphics Package Mark A. Ohlund, Alan J. Zett 

S-80, APPLE, AND ATARI PROGRAMS 

24 Quest 1 Look out for the Wraiths Brian Reynolds, Rich Bouchard, Alan J. Zett 

42 Bsittlef leld Haul out the Howitzers Joe Humphrey, Jon Voskuil 

S-80 PROGRAM 

52 CompU-Sketch Graphics galore Roger W. Robitaille, Sr. 

APPLE PROGRAM 

59 Shark Just when you thought it was safe to go back to the keyboard Mark Cross 

ATARI PROGRAM 

64 Dairy Farming Cream of the crop Scott Xapley, David H. Simmons 

DEPARTMENTS 

4 Editorial Dave Albert 

6 Input From our readers 

7 Outgoing Mail Dave Albert 

11 Calendar of Events Editors 

13 About This Issue Drs. Munchkin 

14 Say Yoho I- Alexis Adams 

16 My Side of the Page Lance Micklus 

18 Machine Head Spyder Webb 

20 The Sensuous Programmer "J" 

22 Bugs, Worms, and Other Undesirables Editors 

88 What's New Ed Umlor 

89 Hardware Corner Ed Umlor 

Cover illustration by Bill Giese 



STAFF 



PUBLISHER: 

Roger RobitaiUe Sr. 

EDITORIAL DEPARTMENT 

Scott Adams 
Dave Albert 
Rich Bouchard 
Mary Locke 
Lance Micklus 
Mark Pelczarski 
Joan Truckenbrod 
Jon Voskuit 
Alan Zett 

PRODUCTION DEPARTMENT 

Lynda Fedas 
Damian Henriques 
Nancy Lapointe 
Tom Stanton 

STAFF 

Patricia Acampora 

Lester Anderson 

Brian Berkebile 

Diana Bishop, Subscriptions 

Kathleen Boucher 

Suzanne Breton 

Philip Brown 

Tara Butler, Dealer Information 

Jeff Carroll 

Donna Cookingham 

Pam Demmons 

Mary Edwards 

Mark Eric, Atari Submissions 

Mary George 

William F. GoMan 

Kathleen Hannon 

Donna Jean 

Bette Keenan 

Bea KimbatI 

Randal Kottwitz 

Karen Lawrence 

Kathy Maloof 

Jean Matthews 

Doris Miller 

Clem Morey, Apple Submissions 

Carol Roane 

David RobitaiUe 

Elizabeth RobitaiUe, Personnel Administrator 

Cindy Schalk 

Ken Sicard, S-80 Submissions 

Joanne Tracy 

Anmar William 

Nancy Wood 

Ed Umlor 

Gary Young 

Cynthia Zawacki 



SoftSide is published each month by SoftSide 
Publications, 6 South Street, Milford, New Hampshire 
03055. Telephone 603-673-0585. Second class postage 
paid Milford, New Hampshire and pending at addi- 
tional mailing offices. ISSN: 0274-8630. Subscription 
rates: USA, $30.00/12 issues. USA First Class APO, 
FPO, Canada, Mexico, $40.00/12 issues. Overseas air 
mail: $62.00/12 issues. Media subscription rates: 
Magazine and cassette, $75.00/12 months. Magazine 
and disk, $125.00/12 months. APO, FPO, Canada, 
Mexico, (add), $36.00/12 months. All remittances must 
be in U.S. funds. Mail subscription inquiries to SoftSide 
Publications, P.O. Box 68, Milford, New Hampshire 
03055. Entire contents copyright 1981. SoftSide 
Publications. All rights reserved. 



POSTMASTER: 

Send address changes to: 

SoftSide Publications 

6 South Street 

Milford, New Hampshire 03055 




EdMmiM^ 



by Dave Albert 

Computers and Fantasy 
Role-Playing Cannes 

We've all seen them before — fan- 
tasy game programs, the ones that 
come in the packages decorated with 
fiery demons, hideous serpents, and 
the occasional scantily clad maiden. 
They promise breathtaking excitement 
and at least two or three light years of 
enjoyable playing time... While the 
claims of the advertisements, both 
direct and subliminal, may be 
somewhat exaggerated, the games 
themselves are really a lot of fun. 
We've seen quite a few of them come 
through our doors, but none quite 
worth printing until this month's cover 
feature came to us. We decided to 
forego depicting ladies too impover- 
ished to afford decent clothing, and we 
don't promise you'll have to be pried 
away from the keyboard with a 
crowbar once you play this game, but 
we've wanted to run a program like 
this one for some time. 

"Quest" by Brian Reynolds of 
Huntsville, Alabama, is a solid com- 
puter adaptation of a Fantasy Role- 
Playing game (FRP). Those of you 
familiar with the Automated Simula- 
tions/Epyx series of FRPs ("Hellfire 
Warrior", "Temple of Apshai", et al.) 
will recognize the format of this one. 
But there is an added feature to this 
program: magic use. For those of you 
who are wondering just what this drivel 
you're reading is about, let me 
backtrack a little. 

FRPs represent the new kid on the 
block in American gaming. The games 
are very open-ended and the setting for 
each is distinct, but the most common 
type is based on heroic fantasy 
literature. The name usually used to 
describe that literary genre is Swords & 
Sorcery, which rather succinctly ex- 
presses the two prime elements of the 
imaginary world in which the games 
are played. Swords, bows, spears, and 
axes are the most technologically 
sophisticated weapons, while spell 
casting and enchanted items are com- 
monplace. So are monsters, demons, 
oversized animals, and carnivorous in- 
sects, not to mention undead creatures 
and their ilk. 

To play, one assumes a character of 
heroic proportions, like a fighter or a 
magician of some sort. There are more 

SoflSide August 1981 



ways to create such a character than 
you can shake a halberd at, but it is 
usually done randomly, with dice. 
Each game system has a set of 
characteristics (Strength, Dexterity, 
Charisma, etc.) which defines the 
character's abilities. Then the 
character equips himself with whatever 
is available which pertains to his pro- 
fession (Fighter, Magician, Thief, Cut- 
purse, Patchpurse, whatever) and sets 
out looking for treasure and adven- 
ture, not necessarily in that order. 
Treasure can be in simple coin of the 
realm, or as complex as arcane scrolls 
containing some powerful enchant- 
ment legible only to those who speak a 
language forgotten centuries before. 
And so forth. Each game has a combat 
system should the hardy adventurer en- 
counter one of the aforementioned 
nasties, and some sort of magic system 
that permits the casting of spells. 

Such games, born in this country in 
the early '70s, are naturals for com- 
puter applications. Adventure (with a 
capital "A"), the truest computer 
game, has some obvious ties to FRPs, 
both thematically and in the 
parameters of permitted activities. The 
primary difference between FRPs and 
their silicon chip counterparts is that 
the computer versions are usually solo 
games, while the traditional FRP is a 
multi-player game run by a referee of 
some sort. But then the computer 
FRPs have matters such as memory 
space to deal with, a limitation foreign 
to the pencil and paper variety. 

Anyway, one of the things we liked 
about "Quest" is the inclusion of 
magic use by the player, a factor absent 
in most of the computer FRPs that 
we've seen around. And the fact that, 
while written in BASIC, it still works 
better than some of its more famous 
Machine Language counterparts didn't 
bother us a great deal either. Of course 
it is still only a single player game, and 
it is finite due to the hmitations of the 
computer, but it is a lot of fun to play. 

So take a look at a new kind of com- 
puter game in SoftSide and let us know 
how it sits with you. If you like it, see if 
you can do a better one. The possi- 
bilities are limited only by your own 
imagination. Q 




LORDS OF KARMA 



The player finds himself in a mythical, magical city to perform as many deeds of kindness and 

bravery as possible. The fun is in the gradual deciphering of the many secrets while exploring verdant 

forests, twisting trails, rugged mountains, and labyrinthine caverns. . . and avoiding lurking monsters. 

Almost no rules to learn; you tell the computer what you want by typing simple English sentences on 

the keyboard. The computer responds with many suprlses in store. Solitaire only. 

S-80 Cassette, 48K $20.00 

Apple II Cassette, 32K $20.00 

PET 32K $20.00 



■5oft5iae, 

\eled 10115 

^^^ 6 3outh Sltvit MiKotd MH 010» 
For Ordari Only 603-0730585 



AVALON HILL 




IS 



Dear SoftSide, 

Re the letter on page 8 of your May, 
1981, issue which says ". . . At least when 
you start reading, you don't read something 
that has nothing to do with your system." 

In that same issue were two programs for 
the S-80 which I as an Apple owner would 
have completely missed had I followed Miss 
Taylor's suggestions. Both "Dairy Farm- 
ing" and "Orienteering" require very little 
modification to go into the Apple and are 
well worth reading even though they were 
not for my system. 

I believe most articles usually have an 
iota of knowledge contained in them which 
can be applied in some way to your com- 
puter education and maybe to your system, 
and shouldn't be written off because they 
weren't for your system. 

I now have two nice (and long) programs 
I otherwise wouldn't have had. 

A.W. Blackburn 
Fort Worth, TX 

Dear SoftSide, 

I'd like to thank you for a marvelous first 
issue upon my return to the fiock. I had 
been one of those who dropped out after 
the switch to the multiple machines listing. I 
decided to look at a friend's copy and saw 
what had gone on and found the transition 
better than the original versions, so I rushed 
out my subscription check and got your 
wonderful June issue. 

The point of this letter is after looking 
over the listing of "Catacombs Of The 
Phantoms", I figured it could be converted 
easily for the S-80. I was right and here is 
what must be done: 

First I changed three of the variables, 
WORM becomes WRM, Go becomes GO 



35ft5ia. 



INPUT POLICY 



SottSlde Magazine welcomes your com- 
ments and thoughts on both the magazine and 
the field of microcomputing. We try to publish 
as many of our readers' letters each issue as we 
can. 

For the sake of clarity and legibility, all let- 
ters should be typwritten and double-spaced. 
Send your letters to: 

SoftSide Publications, 

Input 

6 South St., 

Milford, N.H. 03055 

We reserve the right to edit any letters prior to 
publication. 



(that's a zero, not an O in the new variable), 
and STONE becomes STN. Next, I made 
the following line modifications: 

111 GA = 0:GD = 

361 - eliminate the SETCOLOR com- 
mand 

590 - eliminate the SETCOLOR com- 
mand 

2065 IF LEFT$(A$,1) = "N"THEN140 

1350 IF LEFT$(A$,1) = "N" THEN300 

4000 REM 

Delete 4010 to 4106 (except a print line 
for Tom's byline) 

3000 PRINT" PRESS ANY KEY TO 
CONTINUE"; 

3010 A$ = INKEY$:IFA$ = 
""THEN3010 

3015GOTO110 

These modifications will allow the pro- 
gram to work. Now for a slight improve- 
ment: 

316 IFR = 200THENPRINT 
"NOT HERE.":GOTO220 

This statement prevents a BAD 
SUBSCRIPT error from occurring. 

I'd like to make a few quick suggestions 
before I sign off here — possible additions 
to the magazine. How about a monthly col- 
umn that will show hackers like me the 
modifications needed to run programs 
presented in previous issues in their 
machine's language (like I've done with the 
above)? You could post a small payment 
for readers who contribute (say $10.00 per 
pubUshed mod.) and thus make your 
publication more versatile. Second, how 
about some tutorial articles on graphics for 
the S-80 and other machines? I find myself 
often lacking in this knowledge because I 
shift machines (including Heath, 
CP/M, PET, DEC, XITAN) so often at my 
job and everybody could use this kind of 
help. 

Joseph Teller 
Waltham, MA 



Dear SoftSide, 

Let me begin by saying how much I enjoy 
your magazine. I would, however, like to 
see more tutorial articles included, which 
brings me to one of two reasons I've decid- 
ed to write. In past issues I have read many 
letters that complain about not having 
enough programs or too many programs 
published for a particular computer. On 
that I would like to say that whenever a pro- 
gram is not written for your machine, study 
the program anyway; there are many 
techniques that can be learned and applied 
to your machine. Another solution to this 
problem would be for SoftSide to run a 
series of articles on the differences between 
S-80, Apple, and Atari BASIC so that pro- 
grams could be easily converted from one 
machine to another. 



Now for the second reason I've decided 
to write: One of the most important aspects 
in computer work is the ability to sort a list 
of items alphabetically, such as a mailing 
Ust. Unfortunately, most of the very fast 
(Machine Language) sorting programs that 
have appeared in magazines only sort on 
one field, when, for instance, a mailing list 
may have five or more fields (name, ad- 
dress, city, state, and zip) per entry. So now 
you've got a program that sorts one field 
and you need one that sorts five — throw 
the program away and sort the list by hand, 
right? Wrong! Let's say, for instance, that 
you have a list of 500 entries in the form 
Name, Address, City, State, Zip and you 
need the list sorted by a particular field, say 
by name. There are then six steps that need 
to be followed to sort a multi-field list with 
a single field sorting program; they are: 

1 . Pick a character that does not appear 
in any of your entries, for instance "*". 

2. Enter the information into the com- 
puter, either by hand or off tape or disk. 

3. After each entry is entered, compact 
the fields into a single string with the field 
that needs sorting at the front of the string. 
When compacting the fields, separate the 
fields by the character chosen in Step 1 . In 
this case the string would be in the form 
"Name*Address*City*State*Zip*". If the 
list needed sorting by zip code, the string 
would be in the form "Zip*Name*Ad- 
dress*City*State'*". You now have one 
string that can be easily sorted by a one- 
field sorting program. 

4. Sort the list. 

5. Each string must now be separated in- 
to individual fields. This can be done with 
the mid-string or in-string functions. 

6. As each string is separated into in- 
dividual fields, store the separated string on 
disk, tape, or print the information out. 

This method should work very well on 
STRING information, but numerical infor- 
mation may require additional work. I hope 
that this method alleviates some of the 
problems encountered when sorting 
multi-field lists when a single field sorting 
program is the only one available. I would 
appreciate hearing from those that try this 
method (problems solved or encountered). 

Kevin D. Rich 

Box 344 

Perrysville, OH 44864 

Dear SoftSide, 

You folks seem to like taking it on the 
chin — I really enjoy reading the Input sec- 
tion, but sometimes it reads more like 
World War III. Frankly, I think SoftSide is 
great!! I subscribe to eight different micro- 
magazines, and most look forward to Soft- 
Side because 1 know I'll fmd at least two or 
three good new programs for my Apple. 
Other than "Imhotep" (a real loser), I've 

continued on page 8 



SoftSide August 1981 





n 







by Dave Albert 

Here we go again, this month's 
chance to talk back at you, the reader. 
There are some points to clarify, some 
tentative good news, and various and 
sundry miscellaneous ramblings to 
crank out. Here goes... 

The tentative good news is that we 
may soon be reviving the "Data Base" 
series started by Mark Pelczarski last 
September. He is currently working on 
hammering out some bugs in the Atari 
version, and says he will send both 
Apple and Atari versions after all the 
bugs are cleared up. There's always the 
possibility that he won't be able to van- 
quish the bugs, but we are hoping that 
we may soon resurrect the series. Keep 
an eye on this column for further 
developments. 

The points to be clarified are about 
the "magazine of the future" discussed 
and advertised in the previous issue of 
SoftSide. We intend to go ahead full 
steam on the project, but we also feel 
that the ads may have been misleading 
in one respect. In an undertaking of 
this magnitude, we feel that we have to 
tackle the different computer versions 
one at a time. Since the vast majority 
of our readers own S-80s, that is the 
first system that we will develop the 
enhanced Disk Version for. The Apple 
and Atari disk enhancements will show 
up later in the year. 

Another point I wanted to mention 
is that this month we decided to break 
with a tradition which we have held to 
since we went glossy, which is that of 
using photographic covers. This 



of\]'Q\.0. 




1^1^ 



"LS^ 



month's cover is a piece of artwork by 
a local artist named Bill Giese. We are 
quite proud of it, and may go to more 
illustrated covers in the future. Please 
let us know how you like it. 

And while I'm on the subject of 
covers, we neglected to mention that 
the previous four cover photographs 
were taken by Mary Locke, our copy 
editor/photographer. In future issues 
we will try to make sure to give credit 
where it's due for our cover illustra- 
tions, be they photographs or other- 
wise. 

I have frequently complained in this 
column about the total lack of Adven- 
ture submissions for machines other 
than the S-80...well, that is no longer 
true. We have received ONE such sub- 
mission, an Adventure written on the 
Atari. It has yet to be evaluated, but it 
does contain extensive graphics and the 
preliminary feeling amongst the 
editorial sorts is that we may go with it 
in a future issue. But that doesn't mean 
that you 6502 types should rest on your 
rather skimpy laurels... we still would 
like to see more submissions and fewer 
complaints about the lack of such pro- 
grams in the magazine. We can't print 
what we don't have. 

Next month I will try to answer some 
more questions that have come up in 
the mail, and perhaps launch another 
effort to clarify the mysterious goings 
on around SoftSide. Until then, keep 
those letters and cards coming, 
preferably along with your latest ef- 
forts on cassette or disk. ^ 




ATTENTION 
AUTHORS 

SoftSide magazine, the leader 
in the field of BASIC software 
programming for home computer 
appHcations, is actively seeking 
program and article submissions 
for the more popular home 
microcomputers, as well as 
product reviews. This is your 
chance to make some extra cash 
and become famous in the proc- 
ess! 

We are interested in programs 
written in BASIC with any alter- 
nate language subroutines 
worked into the program only 
within the framework of BASIC. 
Games and educational soft- 
ware, as well as any other ap- 
pHcations for the home computer 
user are preferred, although we 
will consider virtually any type of 
program. 

We are looking for well- 
written, informed reviews of all 
software for the popular home 
computers for publication in the 
magazine. Reviews should take 
into consideration all aspects of a 
particular software package, 
from speed of execution to pro- 
gramming creativity to the 
estimated length of time that the 
product will hold the consumer's 
interest. 

When submitting a program, 
please be sure to include full 
documentation of subroutines 
and a list of variables, as well as a 
brief article describing the pro- 
gram. All such text, as well as ar- 
ticle and product review submis- 
sions, should be typewritten and 
double-spaced. Programs should 
be submitted on a good cassette 
or disk, and should function 
under both Level II and Disk 
BASIC. 

Send to: 

SoftSidePublications 

SUBMISSIONS DEPARTMENT 

6 South Street 
Milford, NH, 03055 

Be sure to send for our free 
Author's Guide. 

We regret that due to the 
volume of submissions we 
receive, we are unable to return 
your cassettes or disks. 



SoftSide August 1981 



Input 



continued from page 6 

found every program well-done, and worth 
the effort to copy. Some of the subroutines 
have even found their way into other pro- 
grams that I've put together myself. So far I 
haven't found any bugs or worms (If I do I 
may have to take this all back), and 
everything runs well. 

Do I have any complaints, well... just 
one. Your letter from Brian Yamauchi, In- 
put, May, 1981, is almost word for word a 
duplicate of what I sent you. 

How about doing something so my issue 
gets here in one piece? Perhaps packing it in 
a wooden crate, or maybe a stainless steel 
envelope would help. Have you considered 
a plain brown wrapper with threats against 
the postal service if they mutilate it, or 
perhaps hand deUvery? Or maybe just using 
a better quality paper would help! I like 
what's inside SoftSide, keep up the good 
work, but let's try to shape up on getting it 
here in one piece. 

Bob Devine 
Adona, AR 



Dear SoftSide, 

First, thanks for many interesting hours 
spent with your articles and programs. Even 
occasionally having to figure out why the 
programs won't run as given (remember 
"BOING"?), and fixing them, has been 
fun. Mostly. We (the Atari 400 was my 
son's Christmas present, and sometimes he 
even gets to use it) especially enjoy modify- 
ing programs, to add frills and to learn 
more about the art of programming. 

One problem we've had during modify- 
ing/debugging is the speed with which a 
LIST scrolls up across the screen. Trying to 
locate a particular statement or to find an 
error in typing becomes an aggravation, 
and time is wasted LISTing and re- 
LISTing. Also the language gets bad (you 
should HEAR that kid). We saw the S-80 
program, "WHOA!", in the December, 
1980, issue, which didn't help except to pro- 
vide the impetus to think up a routine to 
solve the problem for the Atari. To use it, 
start each program (at least during the 
debugging stage) with 

1 GOTO 10 

2 FOR I = LL TO UL: LIST I 

3 IF PEEK(53775)< >251 THEN 3 

4 PRINT "n": NEXT I: STOP 

Line 1 lets a RUN command skip over the 
routine. (If the first regular program line 
number is something other than 10, GOTO 
that instead.) 

Line 2 scans through all numbers from 
LL (Lower Line) to UL (Upper Line), 
LISTing them one by one. (Often it's 
simpler to replace UL with some number 
larger than the largest line number in the 
program.) 

Line 3 stops the scanning EXCEPT when 
a keyboard key is being pressed. (Any key; 
usually the spacebar is most convenient.) 

Line 4 moves the cursor up two lines be- 
tween each LIST (the up arrows are) 

8 



ESCAPE CONTROL characters) to avoid 
spaces between the LISTed lines, and 
(especially) to prevent spaces being added 
for "empty" numbers. Line 4 then goes to 
the next number, and STOPs when 
finished. 

To list the entire program (with UL 
replaced by a suitably large number), type 
LL = 1: G.2 and hit RETURN. Brief 
touches on a key will add one program line 
at a time, while continuous pressure will 
scroll lines up (but conveniently slower than 
the normal LIST). Release the key and the 
displayed lines will wait until you're ready 
to continue. 

To edit the program you have to 
BREAK, but you can continue from any 
desired point by redefining LL. Note that 
LL doesn't have to be a program Une 
number. Also, if there are big gaps in pro- 
gram line numbers, for example between 
subroutines, it's faster to BREAK and in- 
crease LL than to wait while the routine 
scans through several hundred "empty" 
numbers. 

Of course this routine could be added at 
the end of a program, or in the middle — 
but G.2 is easier to remember, and to type, 
than something like G.5460. 

Maybe all the old-timers already have 
something hke this figured out, but, if so, 
they aren't telling us beginners. Perhaps it 
can help reduce eye strain and frayed 
nerves. 

Let me end with a request: the One Liners 
are great for learning new ways to exploit 
the Atari's graphics capabilities. . . but can 
you print an explanation of how the one by 
Kinzebach (May, 1981, p. 3 5) does what it 
does? It's frustrating to enjoy the result, 
but not to know what's going on: Keep up 
the good work on SoftSide. 

Dixon Stroup 
Kailua, HI 



Dear SoftSide, 

I just received my April issue of SoftSide 
and noticed that there was a slight error in 
the "Programming Hints" article by Shane 
Causer. Although Mr. Causer has cut down 
the screen "garbage" by redefining A$, he 
has not saved any memory. On the con- 
trary, he's using up extra memory. Try the 
following program: 

10 A$ = "////////////////////" 
(20 V's) 

20 PRINT MEM + FRE(A$) 

RUN 

FRE(A$) returns the number of FREe 
bytes left in the string memory, so the 
number PRINTed by the computer is the 
TOTAL amount of memory left. Let's try 
changing line 10 to: 

10 A$ = STRING$(20,75) 

RUN 

Notice that six whole bytes are being used 
up. To us memory misers, this is a complete 
waste of valuable memory. Also, to speed 
up programs, using the first method is 
much better. The "garbage" is the Machine 
Language program inside the string, so the 
program can be saved with the subroutine 
already in the program, and the large 
DATA statements deleted. (See the pro- 

SoftSide August 1981 



gram "Cards" in the the November, 1980, 
SoftSide, pg. 57) 

Also, I have found a slight problem when 
typing in these strings (as in the first line 10, 
above.) Sometimes I might slip and type the 
wrong number of "/"s. So, instead of tak- 
ing a risk, I now type: 

10 A$ = "12345678901234567890" 

This is simple to type, and it is easy to tell 
the length. I find this necessary because I 
once was thrown to "MEM SIZE?" 
because of a typing error. 

For those twisted people out there who 
like doing strange things to their com- 
puters, try the following: (Do not do this if 
you have not saved what is on the computer 
at the moment) 

POKE16405,0 

Once you find that this disables your 
keyboard, the only thing you can do is turn 
the computer off. (I warned you not to have 
a program on your computer. Don't blame 
me if you just lost three hours of typing.) 

One last twisted, demented thing to do to 
your computer: 

10 POKE16445,8:PRINT"ABCDEFG..." 
20 FORX = 0TO1000:NEXT 
RUN. 

You figure it out. 

Thomas Andrews 
Chicago, IL 



Dear SoftSide, 

Please make arrangements with SOME- 
ONE to take your Apple programs and 
bench check them for errors. I said "some- 
one" but please use at least three people. 
Give them copies of the final printout to be 
printed in SoftSide. If there are errors, they 
will find them. 

I have just finished two weeks trying to 
debug "Galaxia". The first problem 1 
found was line 90. It may be a quirk of 
DOS 3.1, but I had to reverse LOMEM and 
HIMEM. I also found it necessary to find 
the correct HI/LOMEM with the following 
coding: 

HI — PRINT PEEK(116) 
*256-FPEEK(115) 

LO — PRINT PEEK(106) 
*256-t-PEEK(105) 

When I fire at the Crinoids, I can miss 
them as often as I wish or I can hit the ones 
that are attacking. If I hit ANY of them in 
formation, I am in trouble. The program 
hangs up as soon as one reaches the point 
they are to reposition back up to the forma- 
tion. If I would let the attackers crash into 
me to the last base, it would hang. If I was 
"shot" by the attackers to the last base it 
would hang. 

I do not think I have a problem with my 
keying. All of the program has been 
checked at least three times (lines 
1130—1330). The remainder of the pro- 
gram has been checked at least six times. 

Ken Asmussen 
Des Moines, lA 

Editor's Reply: 

The problem you're experiencing with 
"Galaxia" is probably due to the alteration 



you mentioned to line 90. Tlie purpose of 
setting LOMEM and HIMEM is to protect 
certain areas of memory; if these values are 
clianged, tlien the memory areas in question 
may be o-ver-written witli unwanted infor- 
mation. 

Applesoft stores the actual program lines 
in memory starting at address 2052, and 
then automatically sets LOMEM just above 
the program. LOMEM, then, is the lowest 
address available for variable storage. 
HIMEM is automatically set at the top of 
RAM memory for a system without disk; 
or, with a disk, it's set just below the DOS 
which is loaded into the top 10.5K of 
memory. HIMEM is the highest address 
available for variables. If you PEEK into 
memory locations 105-106 and 115-116, as 
you suggested, the values you find will be 
those set automatically by Applesoft. 

In "Galaxia", however, those values 
need to be reset to protect two areas of 
memory. One area is the second Hi-Res 
graphics page, which occupies memory 
locations 16384-24575. Setting LOMEM 
just above this keeps the program from us- 
ing it as variable space. The second area is 
that which contains the various Machine 
Language routines POKEd in by lines 
1110-1330. These routines occupy 616 bytes 
of memory starting at 31744, so HIMEM 
must be set below that. If it isn't, the 
routines may be overwritten by variables 
and the system will hang up or crash when 
the routines are called. 

I can't see why DOS 3.1 should have any 
problem with the specified LOMEM: and 
HIMEM: statements, since they are Ap- 
plesoft commands. You would need to have 
a 48K machine, however, to use "Galaxia" 
with the DOS booted. I assume you do, 
since you indicate no problem with using 
HGR2, which is not available to a 32K disk 
user either. 

If you do find an error in the published 
listing, please let us know. As with all our 
listings, this one was dumped onto a 
lineprinter directly from a working version 
of the program; if a character was 
misprinted or a line dropped, no one has 
found the error yet. 



Dear SoftSide, 

I loved the "Lunar Mission" by Matt 
Rutter, in the May, 1981, edition of Soft- 
Side, however I added some lines for 
amateurs that will abort your landing pro- 
cedures, but will leave the same amount of 
fuel that you had before you aborted. To 
abort the mission, push the fire button on 
the joystick, while pushng up on the 
joystick. 

The additional lines read as follows, but 
the lettering in the print statement in line 
1100 should be typed in reverse graphics. 
234 IF STR1G(0) = THEN 1000 
1000 FOR Q= 1 TO 4:POKE 
656,l:POKE 657,2:?"MISSION 
ABORTED": SOUND 0,0,0,0:FOR G= 1 
TO 70:NEXT G 

1100 POKE 656,l:POKE 657,2:? 
"MISSION ABORTED" 



1200 FOR K= 1 TO 30:SOUND 
0,10,10,10:SOUND 1,20,10,10:SOUND 
2,30,10,10:SOUND 3,40,10,10 

1300 FOR Kl =0 TO 3:SOUND 
K1,0,0,0:NEXT K1:NEXT K:NEXT 
Q:GOTO 10 

Evan Price 
Roslyn Heights, NY 



Dear SoftSide, 

As sponsor of a high school computer 
club, I can speak for all our members and 
say that we think very highly of your 
magazines. Primarily organized for enter- 
tainment, the members especially enjoy the 
games you publish. 

The "Collision" game by Mark Pelczar- 
ski in November, 1980, is especially 
outstanding and gets much playing time. 1 
have altered it slightly so that it models the 
arcade version more closely. The following 
listing keeps a short sequential file called 
HIGH that holds the scores and names of 
the top 10 scorers. 

I also included a listing of our top 10 and 
would like to hear from others who have ex- 
ceptional scores. Most of these scores have 
been into the fourth rack and two have been 
in the fifth rack. 

Keep up the good work, it sure helps 
teachers like myself to keep the interest go- 
ing. 

Before running "Collision" with my 
changes, run this file initifilization program: 



10 D« = CHR$ (4) 

20 FOR J = 1 TO lOiHS(J) = 0:HS« 

(J) = "": NEXT J 
30 PRINT D«j"OPEN HIGH" 
40 PRINT DJi'KRITE HIGH" 
50 FOR I = 1 TO 10! PRINT HS(I)i 

PRINT HSKII: NEXT I 
40 PRINT D$) "CLOSE HIGH' 



Lynn N. Leopard 
Chillicothe, MO 



1 HONE 

5 D« = CHR« (4) 

7 DIN HSt(12),HS(12) 

10 REN COLLISION 

20 REN C. 1980, HARK PELCZARSKI 

25 PRINT D«i"OPEN HIGH" 
30 PRINT D«!'READ HIGH" 
40 FOR I = 1 TO 10! INPUT HS$(I) 
! INPUT HS(I)! NEXT 1 

45 PRINT D«; "CLOSE HIGH" 

46 GOSUB 4000 

200 IF XY = XC AND YY = YC THEN 

900 
205 IF RK > 2 THEN IF XY = XD AND 

YY = YD THEN 900 

SoftSide August 1981 



900 REN CHECK NEM SCORE FOR TOP 10 

901 TEXT ! HONE : PRINT "YOUR SC 
ORE HAS ';SC 

904 6Q = 

905 FOR II = I TO 10 

906 IF SC < HS(II) THEN 929 

910 X - HS(II)!X$ = HSt(II) 

912 HS(II) = SC 

913 IF II = 1 THEN PRINT 'C0N6R 
ATULATIONS! NEH HIGH SCORE! 
!!": INPUT "PLAYER'S NAME: " 
;HSt(II): GOTO 915 

914 PRINT "NEN TOP 10 SCORE! I": INPUT 
HS$(II) 

915 IF HS«(II) = "" THEN 913 

916 IF II < 9 THEN 923 

917 IF II = 10 THEN 927 
916 IF II = 9 THEN 926 

919 NEXT JJ 

920 HSdl + 1) = XiHS»(II + 1) = 

Xf 

922 II = 10 

923 FOR JJ = 10 TO II + 2 STEP - 
1 

924 HS(JJ) = HSIJJ - 1)!HS«(JJ) = 

HS«(JJ - 1) 

925 NEXT JJ 

926 HSdl + 1) = X!HS»(II + 1) = 

Xt 

927 II = 10 

928 QQ = 1 

929 NEXT II 

930 IF QQ = THEN 955 
935 PRINT D$i"OPEN HIGH" 
940 PRINT D«j"t)RITE HIGH" 

945 FOR II = 1 TO 10: PRINT HS$( 
II): PRINT HS(II): NEXT II 

950 PRINT Dt; "CLOSE HIGH" 

952 GOSUB 4000; HONE 

955 PRINT "PLAY AGAIN (Y/N) ?";: 
GET A« 

965 IF A$ = "Y" THEN 1013 

970 HONE : END 

4000 REN SUBROUTINE TO PRINT HO 
NOR ROLL 

4001 HOHE 

4005 PRINT SPC( 10)!"C L L I 

S I N" 
4010 PRINT SPC( 10); "TOP 10 HON 

OR ROLL" 
4015 PRINT "RANK", "NAHE", "SCORE" 

4020 FOR I = 1 TO 37: PRINT "-"; 

i NEXT I 
4022 PRINT 

4025 FOR I = 1 TO 10 

4026 X = 1 

4027 IF I = 10 THEN X = 

4030 PRINT I) SPC( 10 + X)!HS»(I 
); SPC( 21 - LEN (HS$(I)))i 
HS(I) 

4040 IF I = 10 THEN 4060 

4050 PRINT 

4060 NEXT I 

4065 GET A$ 

4067 HOHE 

4070 RETURN © 

9 




We have all the supplies 
you need for your micro. 

call us today! 



BASF Diskettes 

Box of 10, 5 1/4" Single Density 

#15-DKBSD $34.95 

Box of 10, 5Va" Double Density 

#15-DKBDD $42.95 

Box of 10, 8" Double Density 
#15-DKB8 $49.95 



3-M Scotch Diskettes 

Encased in a rough jacket which resists 
handling damages. 100% certified error- 
free performance. Low modulation 
provides better signal stability. 
Box of 10#15-DKSC $39.95 



Digital Cassettes 

Premium quality digital recording tapes. 
These five-screw cassettes come packaged 
in boxes of ten. They are offered in 10 and 
20 minute lengths. 

#15-010 $6.95 

#15-C20 $7.95 



Diskette Head Cleaning Kit 

3-M Scotch 7400 head cleaning kit is sim- 
ple and easy to use. You simply saturate 
the write head cleaning fabric in the clean- 
ing diskette with the cleaning solution, 
insert the diskette into the drive and turn 
it on. The rotating cleaning fabric alter- 
nately wipes the heads with the solution 
and the dry surface, removing contamina- 
tion from the read and write head. Each 
kit contains two cleaning diskettes which 
will allow you a total of 100 cleanings. 
15-SHCK $29.95 



Soundware 

Soundware adds a whole new dimension 
to your computer games. Programs come 
alive with laser sounds, bounces, clicks, 
sirens, bird calls, music notes, tunes, and 
whatever else your imagination dreams 
up. Just slip in two AA batteries, plug in- 
to your computer, and plug into your 
computer, and have fun. Soundware Soft- 
ware programs are also available to en- 
chance the enjoyment of your computer. 
TRS-80 Mod I/III #26-SNDWR ..$29.95 



Diskette Library Case 

Allows you to store up to 15 mini- 
diskettes in a strong molded plastic car- 
rier. 
15-DKBX $5.00 



Floppy Disk Saver 

PREVENTS: Computer drive's cleaning 
clamping hub from tearing disk's center 
hole; coating removal, scuffing, 
dimpling; and data loss caused by 
improper rotation. 

#15-FSAV $14.95 

#15-FSAVR Refills $7.95 



Disk Storage Box 

Static-free design protects up to 50 mini- 
diskettes. Adaptable to hold cassette 
tapes. Boxes are stackable. Smoke-tinted 
cover, three sectional dividers, and 
durable molded plastic. 
#19-06 (2 lbs.) $19.95 



TS€:HfiTOSID€ 

6 South SI .Millord. NH 03055 (603)673-5144 
TOLL FREE OUTOFSTATE 1 -BOO^SB-1 790 



10 



SoftSide August 1981 




(Q^feroYokiiGo/LJEM^nnfh^ 



August 24-27 

Software Design, Reliability, and Testing Seminar 

Sheraton Motor inn, Lexington, MA 

A four-day senninar for engineers, programmers, and tecfinicai 

managers. Concepts and tecfiniques for developing and testing 

reiiabie, cost-effective software and management concerns are 

discussed. Tuition is $600 wtiicti includes course notes, 

refresfiments, luncfi, and an evening reception. 

Contact: Institute for Advanced Professional Studies, 

One Gateway Ctr., New/ton, MA 02158, (617)964-1412. 

August 24-28 

Seventh international Joint Conference 

On Artificial Intelligence 

University of British Columbia, Vancouver, 

British Columbia, Canada 

Conference will examine computer applications of medical 

diagnosis, computer-aided design, robotics, programmable 

automation, speech understanding, vision, etc. 

Contact: Louis G. Robinson, American Association for 

Artificial Intelligence, Stanford University, 

P.O. Box 3036, Stanford, CA 94305, (415)495-8825. 

August 25-28 

Vector and Parellel Processors In Computational 

Science Conference 

Chester, England 

Conference will concentrate on hardware, software, algorithms, 

applications and case studies concerning vector and parallel 

processors. 

Contact: Mrs. S.A. Lowndes, Science Research Council, 

Daresbury, Warrington, WA4 4AD, England. 



August 26-29 

Fifth Annual National Small Computer Show 

New York Coliseum, New York, NY 

Dally lectures and a five-hour seminar will also be presented 

daily for executives who would like an overall Introduction 

to understanding, buying, and using computers in business. 

Registration fee for the show is $10 a day. The 

seminar fee is $200 per person, including all materials 

and show registration. 

Contact: National Small Computer Show. 

110 Charlotte Place, Englewood Cliffs, NJ 07632 

(201)569-8542. 

August 26 

Boston Computer Society Meeting 

New England Life Hall, Boston, MA 

Meeting begins at 7:30. Various topics of general 

interest to microcomputer owners and users 

are discussed. Meetings are every month. 

Contact: Julie Kuhn, Three Center Plaza, Boston, 

MA 02108 (617)367-8080. 



August 28-30 

Personal Computer Arts Festival 

Philadelphia Civic Center, Philadelphia, PA 

Held In conjuction with Personal Computing '81 Show. 

Demonstrations and talks on microcomputer music synthesis, 

computer-generated visual art, and other computer-based 

rrpstion^ 

Contact: PCAF-81, Box 1954, Philadelphia, PA 19105. 




From 



The "ProgramTYier'e Qnlld 



In a desperate race against the sun 
you search for SMAEGOR Monarch 
of Dragonfolk, who has kidnapped the 
Princess of the Realm and holds her in 
a distant and unknown place. In a 
quest for Honor and glory, you must 
search the land, seeking out the tools 
needed for the ultimate confrontation. 
On The River Delta, in the abandoned 
Temple of Baathteski, Goddess of the 
Blade, everywhere, clues abound. But 
WHERE is the Princess? 

Now, as never before, the genius of 
CHARLES FORSYTHE shines in this 
new machine language ADENTURE. 
DRAGONQUEST! Can YOU save 
M'lady from the iron clutches of 
SMAEGOR? 

S-80 Level II 16K Cassette #26-2210011 . . . $15.95 
S-80 32K Disk #26-2210010 $21 .95 

6 South St .Millord. NH 03055 (603)673-5144 
TOLL FREE OUT-OF-STATE 1-800-258-1790 



SoflSide August 1981 



11 



THESE HARMLESS DISCS 

CONTAIN ENOUGH EXPLOSIVES 

TO SINK A DESTROYER. 



OR WIPE OUT 



These mini-floppy discs for your 
Apple® computer represent 
the culmination of our 
extensive R&D efforts to brins 
you state-of-the-art stratesy 
Sames in submarine and land 
warfare: TORPEDO FIRE and 
OPERATION APOCALYPSE. 

These power-packed sames 
from Strategic Simulations Inc. are 
designed with the same loving cat? 
and uncompromising standards that 
have made COMPUTER BISMARCK - 
our flagship game — a phenomenal 
success hailed by critics and enthusiasts. 



TORPEDO FIRE™ takes you to 
the high seas and murky depths where 
you'll play both hunter and hunted in the 
desperate battle between submarines 
and convoy escorts. 

You are given the sophistication of 
simultaneous order execution and realistic 
sighting rules. You can challenge another 
player or engage in solitaire warfare where 
the computer plays the submarines. 

Create your fleet from 30 ships of the four 
major navies (all rated with historical accuracy 
for speed, weaponr/, and maneuverability) — 
or design the ships to your own specifications. 
Make up any multitude of scenarios — day or night 
actions, single- or multiple-ship battles. 

As the escort commander, use sonar, radar, and 
your eyes to protect the convoy from the enemy below. 
Since the sightings you receive may be false, you wi 
be hard pressed to track the sub and harder still to 
force it to surface with your hedgehogs and depth charges. "^ 

As the submarine commander, you can make full use of 
the remarkable computer-generated Hi-Res periscope view to 
locate your prey. You must then destroy the convoy, attack or 
evade the escorts — all with utmost stealth, lest the seas become 
your watery grave. 

OPERATION APOCALYP8E™carries you to the 

Western Front, circa 1944. You have the opportunity to re-enact 
the various facets of the Invasion of Europe in four separate sce- 
narios, each offering different victory conditions, personnel, 
ordnance, and terrain. 

OPERATION APOCALYPSE uses a revolutionary terrain and 
movement system designed to give you easy and complete 
control over your forces: engineer, infantr/, artillery, and armor 
units. The action takes place on a 7-by-18 hexagon mapboard 
dotted with hills, rivers, bridges, forests, and towns. For further 
battlefield realism, the game also offers hidden movement 

As the Allied General, you can order off-screen artiller/ 
bombardment to soften up German resistance. Or call upon 
airborne landings behind enemy lines to capture key bridges or to 




AN ENTIRE 
BATTALION. 



wreak havoc on the enemy's communications net- 
work Directyourengineersto build bridges so your 
armor and troops can roll towards their objectives. 
As the German High Command, you must pre- 
vent the Allies from gaining a firm foothold on 
the Continent by quickly wiping out their air- 
borne and amphibious landings. Sever the 
highways and bridges to Germany, and 
you'll cripple the Allied advance. 

The computer is ready to take you on as 
the Germans anytime you want a solitaire game. 
It'll be as tough as you like since you have four 
levels of difficult/ to choose from. 



All you need to play both games are an 

Apple II with Applesoft ROM card, 48K 

memory, and a mini floppy disc drive. 

Each for $59.95, both come with their 

respective program disc, a rule book, 

two mapboard cards (for plotting 

secret strategies between moves), 

and various player-aid charts. 

Without a doubt, TORPEDO FIRE 
and OPERATION APOCALYPSE 
represent the finest computer 
wargames available, head and 
shoulders above their 
competition. 
So why wait? Hurr/ down to your 
local store and get your copies today! 
Or get them directly from SSI. Credit card holders, 
call toll free 800-227-1617, ext 335 and charge your 
order to your VISA or MASTERCARD. In California, call 800- 
772-3545, ext 335. 

To order by mail, send your check to: Strategic Simulations Inc., 
Dept. S2, 465 Fairchild Drive, Suite 108, Mountain View, CA 94043. 
All our games carry a 14-day money back guarantee. 




SSTs other games for your Apple: 
COMPUTER BISMARCK,* $59.95 COMPUTER CONFUCT, $39.95 

COMPUTER AMBUSH, $59.95 COMPUTER AIR COMBAT, $59.95 

COMPUTER NAPOLEONICS, $59.95 THE WARP FACTOR, $39.95 
COMPUTER QUARTERBACK, $39.95 CARTELS & CUTTHROATS, $39.95 

* Also available for the TRS40 - Disc> $59.95; Cassette, $49.95 



li 



As part of our demanding standards of excellence, we use ITIBXBII floppy discs. 

TRS-80 is a registered trademark of Tandy Corporation. Apple is a registered trademark of Apple Computer Inc. 




M^JI^^nnc^ 



It's summertime, the living's easy, 
the weather's hot, the mint juleps 
abound, and we munchkin types feel 
that underground may be the best place 
to go to beat the heat, So... 
CWe proudly present "Quest", an ef- 
fort by Brian Reynolds, dexterously 
(deftly, at least) translated by Mssrs. 
Bouchard and Zett. This program per- 
mits the (fool)hardy adventurer to 
wander amongst the labyrinthine 
passages of an underground world, 
where the sun don't shine, as they say. 
"Apshai" veterans may recognize the 
style, but there are some added twists. 
See for yourselves. 

CAnd just when you thought it was 
safe to go back into the ROM, we pre- 
sent "Shark", a lovely little Apple 
maritime game where you get to be the 
voracious predator and your victims 
are cute little fish. We munchkins have 
named all of the fish after our bosses, 
but they won't know about that unless 
they read this, which we doubt they 
will. The program was written by Mark 
Cross, and we hope to see more of his 
stuff in future issues. 
CAnother program presented for all 
of the systems we support is "Bat- 
tlefield", originally written by Joe 
Humphrey, translated for the S-80 and 
the Atari by none other than Jon 
Voskuil, that fellow of questionable 
Dutch descent who brought you the 
delights of mathletics. The man's a 
regular polyglot. 



ONow that you S-80 types understand 
what a VARPTR is, thanks to J.T. 
Phillipp, M.D., you can read his next 
installment and figure out how to use 
one. If you didn't read the first install- 
ment, tough. We can at least assure 
you that a VARPTR has nothing to do 
with the interstellar drives on the 
U.S.S. Exitprise, Cap'n Kirk not- 
withstanding. 

CAnd or Granite Knoggin, our resi- 
dent hardware fount of wisdom has a 
treat for you Model I owners... a cheap 
and simple video reverse modification 
that will ease eyestrain, enhance the 
graphics in virtually any game we've 
played (except spin the bottle), and 
generally make your computer a source 
of wonderment for all your compatriot 
S-80 owners. 

CpIus, Lance Micklus continues in 
his quest for aiding folks in the soft- 
ware business; Joan Truckenbrod 
tackles reflective symmetry in Apple 
graphics; there's another installment in 
that series of seemingly endless col- 
umns, or is that a seemingly endless 
series of columns?, written by that sen- 
suous fellow "J". And there's more, 
but you'll just have to read on to find 
out about it! So until next month, a 
merry munchkin farewell. And don't 
worry about that truck incident men- 
tioned last month, it was just a ripoff 
from an essay written by Saturday 
Night Live's own Mr. Mike. Cheerio! 




Do you 
reap only 
mysteries 
from your 
TRS-80 ROMs? 



ypiy-Tfyv -' ■^"".'.•.•K-' 




MOD IIF HOM 
COMMKNTIJI) 



1/ 

i.,'A HO.V. 



Your book has 
arrived 

Mod III Rom Commented is the book 
Mod III Users have been waiting for 
— it gives the location of most of the 
14K ROMs in the Mod III with 
commentary on them. 

#65-2750018 $22.50 



'nS€:IHPlRDSID€ 

6 South St.Milford, NH 03055 (603)673-5144 
TOLL FREE OUT-OF-STATE 1 -800-258-1 790 



We buy and sell used computers & peripherals." 

ATARI 400, 8K RAM $275.00 

CENTRONICS 730/LP-ll $325.00 

CENTRONICS 799/FRICTION $325.00 

CENTRONICS 779/TRACTOR $350.00 

HAZILTINE 1410TERMINAL $350.00 

O \\ I RS32K EXPANSION INTERFACE $310.00 

»— I DATA SEPARATOR $15.00 

(\ DOUBLER $70.00 

V-^ MOD-I SYSTEM DESK $50.00 + 

TRS-80 MOD-I, 16K, L-ll $625.00 

_ TRS-80 40-TRACK DISK DRIVE $250.00 

iS^ DUAL 40-TRACK DISK DRIVE $475.00 

r ^^^ CENTRONICS 779 (DEMO) $400.00 

T56:HPiP»5ID€ 

6 South St.Milford, NH 0305S (603)673-5144 

TOLL FREE OUT-OF-STATE 1-800-258-1790 / QUANTITIES ARE LIMITED and SOLD ON A FIRST-COME-FIRST- 

' SERVE BASIS. All used equipment is sold with a 30-day HARDSIDE warranty 

All equipment is in working condition. Some cases may have some scratches 
from normal useage. -t- Prices do not include shipping charges. 





SoftSide August 1981 



13 











oDoiro 



by I. Alexis Adams 

Lance Micklus — Magic Man 

This month we have a guest column 
in place of Scott's usual scribblings. 
Scott will return next month; mean- 
while, we hope you enjoy this one from 
the other half of AI. 

As in all professions, there are 
people who receive notoriety for cer- 
tain pieces of work that they do. For 
others, practically everything they 
release becomes a classic. Lance 
Micklus falls into the latter group. 

Lance Micklus is a man of excite- 
ment and intelligence, a man who 
shows a great love for people. For 
some people, computers are a way of 
life, while for others they represent a 
dream come true. For Lance, com- 
puters are more of a fate... as he says, 
"I fell into it, twice." 

The 1960s, for our people and for 
our country, constituted a time of 
many new beginnings. Rioting, 
fighting, and rebellion filled the 
streets. In Lance's case, the '60s 
marked the beginning of his career, 
although not even he knew it then. 

It began in the summer after he had 
finished high school, before he was to 
start college in the fall. IBM was of- 
fering summer jobs to the children of 
employees and Lance decided to take a 
position. For the next three months he 
was a computer operator. The fol- 
lowing year all they had available was a 
full-time position, so for the following 
year and a half he worked for IBM in 
that capacity. It was at IBM that he 
learned Machine Language. 

Lance was still attending college 
when he worked for IBM. In 1969 he 
graduated, and, rather than returning 
to a career in computers, he decided to 
follow another love: radio. He joined 
up with a radio station and worked 
there for a while, and then proceeded 
to go to work for a television station. 
The TV station used computers, and 
the knowledge of Fortran that Lance 
had picked up in college was put to 
good use. Lance fell ill for about six 
weeks while he was working for the TV 
station and used a terminal at his home 
for work during that time. The ter- 
minal at home helped him to make the 
decision to go back to using a com- 
puter. 

Lance had heard about the Radio 
Shack computer and decided to look 
14 



into it further. He soon purchased one 
with the hopes of using it as a terminal. 
When he bought it, he was told that a 
super terminal package was soon to be 
released. He never imagined that he 
would come to write the terminal 
packages that would become the in- 
dustry standards. 

Lance's path to fame began when he 
answered an ad in Kilobaud for TSE's 
lending library, a legitimate lending 
library where one would send in $10 
and get a tape with a program on it. 
The tape would be leased out, and part 
of the money would be used to pay 
royalties to the author. That idea never 
fully worked out, but it still gave Lance 
his introduction to Roger Robitaille 
the founder and publisher of SoftSide 
The association was to serve both of 
them quite well in the future. 

**What the Market 
Needs is Something 
New, Original and 
Creative." 

"It's hard to make a living just 
writing software," Lance says. He 
points out that there aren't many 
people, if any, that are successfully 
doing it. Some authors have also 
branched out into producing and 
marketing their products. (This is a 
topic which Lance has covered in the 
past few installments of his bimonthly 
column in SoftSide... Ed.) 

When asked what words of wisdom 
he might have for up-and-coming 
authors. Lance notes that "The prob- 
lem I see with programs now is that 
they are imitations of others seen 
elsewhere." For instance, Adam 
Osborne wrote an accounting package 
many years back. Companies are now 
buying the rights, doing small 
modifications and conversions, and 
selling it. One of Lance's current proj- 
ects is writing his own accounting 
system, using his own ideas. What the 
market needs is something new, 
original and creative. 

Lance's recent marriage to his lovely 
bride, Dianne, hasn't hindered his 
career a bit. She is very supportive of 
him, yet is not directly connected with 

SoftSide August 1981 



~3^ 



his business. I would like to take this 
space to say that I think Lance is very 
lucky to have such a supportive part- 
ner. While Lance and Dianne honey- 
mooned in Atlantic City, he received 
the inspiration for his latest program. 
Not being a gambler, and seeing all the 
gambling going on, he became very in- 
terested in the game of Craps. They 
learned all that they could about the 
game and took a gambling table home. 
Lance scanned the industry (com- 
puting) for Craps games and was left 
dissatisified with what he found. As he 
did with his smart terminal programs, 
he decided to write his own version of 
Craps for the color computer. He 
hopes to have it available for the S-80 
Model I and Model III soon. (For more 
on the development of this infamous 
program, see Lance's past 
columns. ..Ed.) 

When I asked him where his inspira- 
tion comes from, he said his hobby of 
magic helps him a lot. His residence in 
past years was in Michigan, some 15 
miles from Colan, which is the magic 
capital of the world. Lance uses his 
magic to entertain people. He feels that 
the programs he writes on the com- 
puter are similar in that their purpose is 
to entertain. He never feels like he is 
working on a machine. He feels that 
his computer is the instrument which 
allows him to implement his creativity 
to create his software masterpieces. 

Lance's other hobby, photography, 
has equally helped him in his career. 
The photography methods used for 
graphics filming at the TV station are 
much like what is used on the color 
computer. While what he photographs 
in life is different than his game 
graphics, his experience certainly helps 
him in his computer endeavors. 
Lance's love for people shines through 
in his photographs. While his shots of 
scenery are photographically correct, 
they don't shine with creativity like his 
shots of weddings and nudes which are 
his specialty. 

What lies ahead not even Lance and 
Dianne know. I am certain, however, 
that anything that Lance does will be 
given his best effort. If his work was a 
star, it would be shining all over the 
world, as bright as gold. Q 



New Books from TSE HARDSIDE 



MORETRS-Sg 
BASIC 




Programs For 
Beginners 
on the TRS-80 

by FRED BLECHMAN 

Here's a valuable book of practical and 
interesting programs for home use that can 
be understood and used immediately by the 
beginner In personal computer program- 
ming. You'll learn step-by-step how 21 sam- 
ple TRS-80 programs worl<. Program tech- 
niques are described llne-by-line within the 
programs, and a unique Matrl-Dex matrix In- 
dex will enable you to locate other pro- 
grams using the same BASIC commands 
and statements. Each program Includes a 
detailed description, a complete listing, an 
explanation of what the program does, and 
Instructions for modification. 
HAYDEN BOOK COMPANY, Inc. 
Order #65-2100046 $8.95 



Apple Machine 
Language 

by DON INMAN & KURT INMAN 

Learn machine language programming In 
practically no time at all! It's easy with this 
ALL NEW guide to the APPLE computer. If 
you already l<now BASIC, you're on your 
way to developing real expertise on the sub- 
ject. This book combines color, graphics, 
and sound with clear-cut demonstrations to 
help you learn — FAST! You'll start off 
simply, using BASIC statements like POKE, 
PEEK, and CALL to enter and execute 
machine language programs. Then you'll 
develop a BASIC Operating System, enter- 
ing and executing your machine language 
programs from there. The next step will 
have you using an Apple System Monitor to 
program directly and save the time usually 
needed to interpret BASIC statements. 
Finally, you'll learn how to use the Apple 
Mini-Assembler to avoid the troublesome 
details Involved with direct machine 
language proramming. 
RESTON PUBLISHING, Inc. 
Order #65-21 1001 B $12.95 



More TRS-80 BASIC 



by DON INMAN/RAMON ZAMORA/ 

BOB ALBRECHT 

Here Is an exciting new Interactive pro- 
gramming guide to advanced functions. A 
sequel to the authors' highly popular book 
TRS-80 BASIC, More TRS-80 BASIC helps 
you build on your fundamental knowledge 
of Level-ll BASIC with scores of practical 
applications that are both recreational and 
educational. It explains all TRS-80 Level-ll 
BASIC statements, commands and 
features not covered in their previous best 
seller. Along with an exploration of the 
PEEK and POKE functions of the TRS-80 
Model-I, you'll get a clear demonstration of 
several different methods to display 
graphics, including little known "super- 
graphics" techniques. You'll explore vital 
concepts in Information processing and 
master file handling techniques that apply 
to both cassette and disk files. You'll also 
discover many "universal" applications 
easily adaptable to specific problems. 
JOHN WILEY & SONS, Inc. 
Order #65-2330026 $9.95 

Apple-ll User's Guide 

by LON POOLE 

The Apple-ll User's Guide is the key to 

unlocking the full power of your Apple-ll or 
Apple-ll Plus computer. The extensive 
user's guide will help you program In two 
versions of BASIC using sound, color, and 
graphics to full effect. This book contains 
detailed Information on the disk drive and 
the printer. Includes tips on advanced pro- 
gramming topics. Fully describes how to 
use the Machine Language Monitor. Shows 
how to use high resolution graphics with In- 
teger BASIC. Provides a compendium which 
thoroughly describes every BASIC state- 
ment, command, and function. It's all here, 
In the Apple-ll User's Guide, thoughtfully 
organized and easy to use. 
OSBORNE/McG RAW-HILL. 
Order #65-255001 6 $15.00 



Data File Programming 
In BASIC 

by LeROY FINKEL & JERALD BROWN 

Data files are the key to effectively using 
microcomputers for virtually all business, 
classroom management, professional, and 
sophisticated home applications. Yet sur- 
prisingly few micro users understand how 
data files work, and fewer still are able to 
set up and maintain them for their own use. 
This easy-to-follow book Is the first self- 
instructional manual designed for the 
thousands of business and professional 
users and computer hobbyists who want to 
add this powerful tool to their computing 
capabilities. It shows you — In comprehen- 
sive and comprehensible detail — how to 
program and maintain data flies on 
microcomputers, and how to write data file 
programs that are readable, efficient and 
useful. This clear nontechnical book leads 
you at a comfortable pace through each 
step involved in data file programming and 
maintaining data files, with dozens of sam- 
ple programs and practical advice to 
smooth your way. 
JOHN WILEY & SONS, Inc. 
Order #65-233001 B $9.95 




T5€:HfiRD5ID€ 



6 South St .Milford, NH 03055 (603)673-5144 
TOLL FREE OUT-OF-STATE 1 •800-258-1 790 



SoftSide August 1981 



15 




Mw §)fKok^idlA(^J^m(i 



by Lance Micklus 

Getting a Bit Serious — Part 4 

I suppose you're all wondering how 
"The Mean Craps Machine" is making 
out. Well, the answer is that it isn't. 
Keeping in mind that articles are writ- 
ten in advance of their publication, 
Part 3 of this series has not yet ap- 
peared in SoftSide and I am now 
writing Part 4. This means that as I am 
writing this right now, the only 
persons who know anything at all 
about "The Mean Craps Machine" are 
Dennis Brent, Scott Adams, whoever 
reads article submissions at SoftSide, 
my wife, my son, and the mouse. In 
short, nobody really knows about my 
"Craps" game except for a few friends 
and the family. I'm sure many of you 
readers can identify with my situation 
and have been in the same boat. What 
we need is some marketing and that's 
what I'm going to cover this month. 

Basically, there are two ways to 
market a program. The first method is 
to do it yourself and the second is to 
have somebody else do it for you. Let's 
consider each of these options. 

DOING IT YOURSELF 

The first step in marketing 
something is to let people know exactly 
what it is you have to sell. There are 
various ways of doing this — some are 
cheap and some are expensive. 

If you have some type of com- 
munications capability, you might 
advertise your program on any of the 
various bulletin boards. Your only ex- 
pense is that of a phone call plus the 
connection time, if any. 

Another method is to submit press 
releases to the various computer 
magazines. Many magazines have a 
section on new software. You might be 
able to get a free plug there. If you're 
really lucky, somebody might even 
write an article about your program to 
give you more free exposure. 

If you're willing to spend some big 
dollars, you can buy some advertising 
space at roughly $1,000 a page. Of 
course, you don't have to buy a full 
page ad \3ut I mention the figure to give 
you some feel for the costs you might 
incur; but you're also going to have to 
add to that price the cost of getting 
camera-ready copy made. Most cities 
have ad agencies which can do that 
kind of work for you. If it's a simple 
16 



"B^ 



ad, you might be able to get the whole 
job done for $100. 

Direct mail is another method of get- 
ting the word out that you have a pro- 
duct to sell; but if you're new and just 
starting out, you probably don't have a 
mailing Ust of previous customers to 
work with. Such lists can be bought, 
though, if you're willing to spend some 
money. 

One excellent way to advertise is to 
include advertising material with all of 
your outgoing orders. It's almost like a 
free ride. However, if this is your first 
program, you'll have to rule this idea 
out. 

If you sell to retail stores, you can 
get a lot of free advertising. By becom- 
ing part of their line, you automatically 
get put in their catalog and might even 
get a spot in the magazine ads. 

*'One excellent way 
to advertise is to 
include advertising 
material with all of 
your outgoing 
orders. It's almost 
like a free ride/' 

Besides advertising, the other ob- 
vious problem is packaging. You're go- 
ing to have to make tapes or disks and 
include some kind of instructions for 
their use. Tapes and disks are easy to 
duplicate because all they require is a 
computer — something you already 
have. Instructions are more of a 
problem. Most people don't have their 
own photocopiers. Also, many 
photocopiers don't make nice clean im- 
ages that look like offset printing. One 
way around this is to go to one of those 
speedy print shops. However, it's go- 
ing to cost you around $100 to $200 
dollars to get a stack of manuals 
printed. That assumes camera-ready 
copy. If you don't have a good word 
processor and letter quality printer — 
or no printer — you can usually bor- 
row a decent typewriter from someone 
and type the thing. Better yet, if you 
live in a college town, there are always 
people who sell typing services for stu- 

SoftSide August 1981 



dent's papers. Have one of those peo- 
ple do it. 

When most people think of 
marketing, they think of advertising 
and packaging. While this is what 
marketing is all about, there are other 
unrelated things that go along with it. 
You may not consider these things as 
marketing problems, but they are 
problems that anybody doing 
marketing is going to have to solve. 
Let's consider some of these. 

When your orders do come in, how 
are you going to get the money? If the 
customer sent you a personal check, it 
might bounce. If you wait for the 
check to clear the bank, then your 
order system gets complicated. A lot of 
people will want to pay with plastic 
cards. It's easy to become a 
VISA/MasterCard merchant if you're 
a business. But, as an individual, the 
bank may give you a tough time. 

The telephone is another source of 
problems. What happens if somebody 
calls with a question and your six-year- 
old kid answers the phone? What hap- 
pens if they call while you're at work 
and they leave their work number to 
call back at? Are you going to sound 
cheap and call them back collect or are 
you going to pay for the call yourself? 

Speaking of the telephone, here's 
another good one. If you regularly 
advertise your phone number for the 
purpose of selling products or services, 
you are using your telephone for 
business purposes. In simple English, 
that means you must now have a 
business telephone instead of a residen- 
tial telephone. Now a business 
telephone looks just Uke a residential 
telephone. It even looks the same way. 
All you do is pick up the receiver, wait 
for the dial tone, then dial the number. 
In fact, business telephones are exactly 
like residential telephones except for 
one small difference — they cost twice 
as much. 

You're also going to have to give 
some thought to the government. 
They're always ready to stand by your 
side so they can collect their share of 
your hard-earned money. You will 
have to keep books, which means set- 
ting up an accounting system. Other- 
wise, you can't prove your expenses 



and you may get taxed on all of your 
income even though most of it was 
spent on legitimate business expenses. 
While you're doing all of this book- 
keeping, YOU might as well help your 
state collect ITS sales tax. 

I'm trying to make two points here. 
First, there are ways to market a pro- 
gram yourself with very little money if 
you're willing to compensate for it with 
a lot of extra work. But, if you do have 
money, you can save yourself some 
work and do a better marketing job. 
Second, there are a lot of things to be 
considered and to be worked out 
before you get started. Otherwise, 
you're going to feel that you just got 
yourself into something you wish 
you'd have never gotten involved with. 



THE PUBLISHER 



The word "publish" really means 
"to make public". A publisher, then, 
is one who makes things public. Nor- 
mally, we associate publishers with 
books and magazines. However, since 
there is such a similarity between 
writing a computer program and 
writing a book or an article, a person 
who makes and sells computer pro- 
grams submitted by others is also 
called a publisher. There are, however, 
differences between the software 
publisher and the publisher who works 
with the written word — but that's for 
another time. 

The first step is to select a publishing 
company that would be interested in 
your product. Publishers tend to 
specialize. Some aire good at marketing 
business-type software while others 
have established themselves in games. 

After identifying a suitable 
publishing company, submit your pro- 
gram along with all the documentation 
you have. Whoever evaluates your pro- 
gram is not going to have a lot of time 
to figure things out. They're going to 
read your documentation first to see if 
it is a program that sounds interesting. 
If it is, they're going to set it up to run 
along with a lot of other programs to 
see how it works. It now becomes a 
question of how long you can keep 
their attention. 

Assuming it's a good program, the 
publisher will contact you to give you 
the company's terms. The kind of 
terms you can expect to get is a subject 
I'll cover later on. For the moment, let 
me say this: Think about the offer for a 
few days and then respond. A good 
publishing company will never use 
your submission until you've agreed to 
its terms. If you don't like the terms, 
don't accept them. It's still your pro- 



gram and you have the right to refuse 
any offer. You do, however, have an 
obligation to notify the company of 
your decision as soon as possible. If 
you do accept the terms, then your 
work is done. This is the beauty of 
having somebody else market the pro- 
duct for you. 

The pubUshing company basically is 
going to deal with all of the problems I 
outlined earlier. It will keep the books, 
pay the taxes, and make the phone 
company happy. Because it is a 
business, it can take charge orders. 
Just about all publishers advertise in 
magazines so they have the means to 
promote your program. Finally, they 
are well-equipped to handle phone calls 
in a professional manner — answering 
questions and giving customers 
assistance. 

**Not everybody likes 
to market through a 
publishing company. 
One reason is 
ignorance. There's 
a lot more to 
publishing than 
most people think." 

What you get is a check every month 
and a statement at the end of the year 
for your income tax records. No book- 
keeping is required on your part unless 
you want to deduct your own expenses 
for making the program that made the 
money. Talk with somebody 
knowledgable about the tax laws on 
this. You may find some nice deduc- 
tions with very little effort on your 
part. 

Not everybody likes to market 
through a publishing company. One 
reason is ignorance. There's a lot 
more to it than most people think. 
Assuming you know what you're get- 
ting into, one very good reason to 
pubhsh yourself is so you keep control 
of your product. Being in control, you 
can decide what the package will look 
like and what the ad copy will say. You 
can also decide how much advertising 
space should be devoted to your 
product in computer magazines. If you 
can handle it, that's great. Realistical- 
ly, though, most people can't and a 
publisher will make the best decisions 
for all parties involved. 

Another reason for pubUshing a pro- 
gram yourself might be that there isn't 
a publisher who can effectively market 
this type of program for you. For ex- 

SoflSide August 1981 



ample: If you wrote a program which 
generated a program log for a radio or 
television station, you'd have a hard 
time finding a publisher who reaches 
this market well. Not only that, there 
are almost no publishers who have any 
experience in this field and can take on 
the customer support when questions 
come up. 

One new trend in software 
publishing works this way: Let's say 
that I decide to publish a game myself 
but I don't have the facilities to 
manufacture the tapes and to package 
them. What I might now do is go to a 
company like Adventureland and have 
them manufacture and package the 
product for me to my specifications. 
The rest of the marketing operation is 
still all mine. This way I have total con- 
trol over my product, but I don't get 
hung up over the manufacturing part 
of the marketing operation. 

You can also turn this around. In- 
stead of using a publisher to do all of 
the work, you can do the manufactur- 
ing yourself. You then sell the finished 
product to the large publishers and 
they, in turn, just distribute and adver- 
tise it. 



CHOOSING A PUBLISHER 

Sometime after I lost my interest in 
computers and found my interest in 
computers again, I was very active in 
photography. I was never famous, but 
I managed to achieve what I consider 
to be a small amount of success. 

One afternoon, a young woman who 
worked with me and who was starting 
out in photography, showed me some 
pictures she was planning to exhibit 
and to try to sell. She asked for my 
opinion. 

I took one look at her pictures and 
immediately pronounced them to be 
terrible. She wanted to know why and I 
told her I didn't know. Then she 
wanted to know what made me think 
they were terrible. I told her the reason 
was that the photographer who took 
the pictures thought they were terrible. 
Well, she didn't think they were 
terrible and they were her pictures!!! 

Now we get down to the heart of the 
matter. I pointed out to her that the 
prints looked like they were done by 
one of those $1.25 super discount 
photo labs that advertise their specials 
every morning at three o'clock during 
the WPIX late movie. The frame was a 
cheap cardboard mat which obviously 
cost $1.00 at a department store. In 
short, it looked like the photographer 



continued on next page 



17 



continued from previous page 

didn't want to spend any money on the 
pictures because they weren't worth 
anything. 

Then I told her to think about my 
own pictures which she had seen. They 
were all hand enlarged, carefully 
printed, custom-cropped, color bal- 
anced exactly, dust-spotted, given a 
protective spray coating, and attrac- 
tively framed. While you may not like 
my pictures, at least you would know 
from looking at them that I liked 
them. After all, if I don't like my own 
pictures, why should anybody else? 

Since our discussion, the woman 
quit her job, got married, had a baby, 
and has never asked for my advice 
again. 

Really, all I'm telling you is 
something about human nature. We 
like people who like themselves and 
disUke people who are at odds with 
themselves. But it's not just people. 
It's anything. Some of the worse pro- 
grams I've seen are the ones that gave 
me the impression that the author was 
teUing me, "I gave it a try and this is 
what I came up with." Gee, if the 
author isn't sure that program is any 
good, why should I be sure? On the 
other hand, if you think about some of 
the best programs you've ever bought. 



didn't you get the feeling that whoever 
wrote the program was proud of it? 
Maybe you never thought about it, but 
it's true. Good programs always con- 
vey this impression. 

The first impression we get of 
anything is from the way it looks. 
That's why the packaging is so impor- 
tant. It's got to convey the feeling of 
pride. It should never stop there. Once 
the purchase is made, the user should 
continue to feel that same feeling of 
pride long after starting to use your 
program. 

But let me take this one step further. 
If a publisher produces a product that 
is packaged with pride, then that tells 
you, as a programmer, something 
about the publisher. Certainly, if 
you're going to let a company publish 
your work, you'll want one who will 
treat your program like it was 
something important and something 
it's proud to sell. Your first clue is the 
way the publishing company puts it all 
together — the appearance of the 
products it sells. So, the game becomes 
one where the author projects the im- 
age of pride in the work and the 
publisher helps to convey that impres- 
sion from the beginning with the 
package. 

When you find a publisher like this, 
all of the other considerations will 



almost always fall into place. Such 
publishers will give you the best royalty 
arrangements you can get. Then, when 
they start selling your program, they 
will service the product. 

By servicing the product, I refer to 
two things. First, the quality control 
that goes into the product. Second, 
customer support after the sale is 
made. Remember, if a tape doesn't 
load, it's YOUR PROGRAM that 
doesn't load. If the user can't figure 
something out and get help, it's YOUR 
PROGRAM that doesn't work. 

From time to time, people come to 
me looking for jobs. This business 
about attitude is one thing I always 
bring up. I can teach anybody how to 
run a computer. I can teach anybody 
how to program a computer. But I 
don't know how to teach people how 
to put pride in their work and produce 
something that says, "The author was 
proud of this." The secret is all in your 
attitude and it's something that can't 
be taught. 

FOOT NOTE: Just before sending 
this article to SoftSide, I found out 
that there was a Craps game program 
which was sold by G/2 — now out of 
business. It apparently played a full 
game of Craps with all the betting op- 
tions. ^ 



MOrijiNC ucon 

I II I LI III IL I ILI lU 



ni 1 1 




LOOK: ^00 AR^ 
MOT AUVb. 




PROVb 
ITi 




LIF^ [S A 
PROCESS.,, 




WOO, ON TUB OTHER HAMD; 
OF EU^GTROh^lC C11$CUIT5. 




WOU OWLV 




CVOU A\$5 tOoT 




A P^RSOIOAUTV... 




woo A^E MOT 








18 



SoftSide August 1981 




The Lazy Man's Shortcut to Machine Language 



A BASIC Compiler in BASIC! Run your source program in BASIC, 
compile it into FAST Z-80 Code and execute the compiled version — all 
without reloading. 26 integer variables, GOTO, COSUB, END, REM, 
RND, LET, +, *, /, IF, THEN, =, INKEYS. CLS. PRINT®, CHR$, 
PEEK, POKE. Compiled programs may be saved via TAPEDISK. 

Supplied with game program, "3-D TIC TAC TOE", which uses all 
of the TINY COMP statement set and is ready to compile. 

Manual includes several sample programs as well as through documen- 
tation of the Compiler for those who like to know "how things work" 
and for those who might even wish to EXPAND on TINY COMP's 
capabilities. 

16K, S-80 Cassette $19,95 

32K, S-80, Disk $24,95 



-5oft5iae, 

seledionj 

^^^ 6 3Duth Str«at 



Str«at Mirrord NH OIOSS 
For Orders Only e03-673-05B5 



MOVE 1 -2-3 



MOVE 3-2-1 



[Move 1-2-3 is a brand new concept in com- 
Iputing technology. Now you can convert froml 
Mod. I to Mod. Ill by file name or extension] 
'without having to convert an entire diskette. 
You rnay also select from a list as it passes in 
review. And with Move 3-2-1 you can convert 
back again! 

Move 1-2-3 requires: Mod. Ill, Two Drives 
and 32k. 

Move 3-2-1 requires: Any DOS, Mod. I, Two 
Drives, 32K and the PERCOM DOUBLER. 

Convert Yourself for only $29.95 #26 275001 d 



T5€:iHPIRDSID€ 

6 South St .Milford, NH 03055 



(603)673-5144 

TOLL FREE OUT-OF-STATE 
1-800-258-1790 



K-Byters 

ANOTHER 

PROGRAMMING 

CHALLENGE 



Last summer SoftSide began in- 
viting its readers to submit "One 
Liners" — self-contained, single-line 
programs for the S-80, Apple, or 
Atari which would provide a con- 
tinuously changing graphics display. 
The response has been excellent, and 
we're still looking for more submis- 
sions. 

Now we have a new challenge for 
you as well: "K-Byters". A K-Byter 
is a BASIC program which fits into 
IK (1024) bytes of program memory. 
There aren't any restrictions on the 
nature of the program, other than its 
size. It can be a graphics display, a 
game, a mini-adventure, or anything 
your imagination and programming 
skills can create. 

Note that the program does not 
have to RUN in IK of memory; it can 
use as much RAM for arrays, strings, 
graphics mapping, etc., as you need. 
We'd prefer that it be able to run in a 
16K system, but this is not an ab- 
solute limit. 

Here, then, are the official rules: 

1 . The program must be written for 
the Apple, S-80, or Atari, entirely in 
BASIC (although it may create and 
call Machine Language routines). 

2. The program must occupy no 
more than 1024 bytes of memory 
before running. 

3. The program must be submitted 
on tape or disk, accompanied by your 
name, address, phone number, and a 
brief written description of its opera- 
tion. 

4. The tape or disk will be returned 
only if accompanied by a self- 
addressed envelope with adequate 
postage AFFIXED (do not send 
money). 

5. Winners will have their pro- 
grams published in SoftSide and will 
receive certificates extolling their vir- 
tues as programming wizards, for all 
the world to see! 

Send submissions to: 



K-Byters, c/o SoftSide 
6 South Street 
Milford, NH 03055 



© 



SoftSide August 1981 



19 



by "J" 

The Fourth Enticing Entry 

One of the nice things about com- 
puters is that you can tell them where 
to go, under exactly what cir- 
cumstances, and they obey without a 
moment's hesitation. How many 
PEOPLE do you know who are so 
obliging? 

There is, of course, a built-in logical 
flow to every computer program. That 
flow is primarily controlled by the pro- 
gram's line numbers. It makes no dif- 
ference how randomly you type in the 
various instructions of a computer pro- 
gram; the computer looks not at the 
order in which they are entered, but at 
the order of their line numbers. So in- 
sistent is the infernal machine on 
having its way in this matter, that no 
matter how you try to confuse it, it will 
always list the program lines in ascend- 
ing numerical order. 

This comes as no great shock to most 
of you, I'm sure. (I do, though, 
remember this as one of the fascinating 
things about my very first hands-on 
contact with a computer — along with 
seeing letters appear on my TV screen, 
and watching a screen full of text scroll 
upward after the last line was filled!) 
The line numbers can jump by ones or 
by ten-thousands or whatever incre- 
ment you choose, but the flow of the 
program will always hop from one line 
to the next higher line. 

Unless, of course, you take the trou- 
ble of telling the computer where to go. 
You can make a program run 
backwards if you want to badly 
enough. Like this, for example: 



10 GOTO 50 
20 END 
30 GOTO 20 
40 GOTO 30 
50 GOTO 40 



It doesn't QUITE run backwards, 
since it does insist upon starting at the 
lowest line number, but you get the 
idea. The flow is virtually reversed, go- 
ing from 10 to 50 to 40 to 30 to 20. (We 
could force the ultimate reversal to 
happen by dropping line 10 and giving 
the command "RUN 50" in place of 
the usual "RUN".) 

Such a program, of course, doesn't 
do anything useful except demonstrate 
a point. But there are countless in- 
20 



"v©/" 



stances where something very useful 
can be done by overriding the normal 
flow of a program from lowest to 
highest line numbers. You may have 
some doubts about the "usefulness" of 
the following program, but at least it's 




a little less trivial than the previous 
one: 



10 PRINT "HI, I'M ATAPPLE-80; 

WHAT'S YOUR NAME?" 

20 INPUT N$ 

30 PRINT "PLEASED TO MEET 

YOU "'NS 

40 PRINT "WHO'S THAT STAND 

ING NEXT TO YOU?" 

50 GOTO 20 



Obviously, if it's repetitive, inane 
conversation that you want, this pro- 
gram will give it to you. A whole even- 
ing's entertainment for a group of 500 
is pretty good for a five-Hne program, 
no? And it's all made possible by that 
tricky little line 50, which gives you ab- 

SoftSide August 1981 



solute power over the flow of the pro- 
gram, overriding all the computer's in- 
born instincts to jump to the next 
highest line number. 

Ah, but what if such absolute power 
is a little too heady and autocratic for 
your tastes, and you want to give the 
computer a bit of a role to play in 
deciding where to go next? In addition 
to its willingness to go where you want 
it to go as it executes a set of in- 
structions, one of the most useful 
features of a computer is its ability to 
make certain kinds of decisions. You, 
as the programmer, must precisely 
define the type of decision to be made; 
but once you do that, the computer will 
unerringly make the "right" choice 
and act accordingly. 

The most common decision-making 
instruction available to the BASIC pro- 
grammer is the "IF... THEN" state- 
ment. "GOTO" allows you to tell the 
computer unequivocally where to go 
(that's called "branching"). "IF... 
THEN" leaves the decision up to 
the machine, according to the decision- 
making criteria you've given to it 
(that's called "conditional branch- 
ing"). Here's an example of 
branching, both conditional and un- 
conditional: a simple program that tells 
you whether a number that you type in 
is positive or negative. 



10 PRINT "TYPE IN ANY 

NUMBER: "; 

20 INPUT N 

30 IF N < THEN GOTO 60 

40 PRINT "YOUR NUMBER IS 

POSITIVE." 

50 GOTO 70 

60 PRINT "YOUR NUMBER IS 

NEGATIVE." 

70 END 



The one thing about having a com- 
puter make decisions for you is that 
you have to program it to consider all 
the possibilities. If you miss one, 
there's no way that dumb machine is 
ever going to come up with the smarts 
to help you out. The above program is 
a good example of a logical gap be- 
tween the programmer's ears. It works 
— but not quite all the time. The set of 
instructions (the program) gives the 



computer the ability to distinguish be- 
tween positive and negative numbers, 
which certainly covers most of the ter- 
ritory. But it leaves out the unique case 
of the non-negative, non-positive 
number, zero. And because the pro- 
grammer didn't think of that, the com- 
puter will blow it if somebody types in 
a zero. Line 20 checks to see if N is less 
than zero. Zero, of course, is NOT less 
than zero. So the test fails, the pro- 
gram does not branch to line 60, and it 
continues in the normal flow pattern of 
going to the next higher line number. 
That happens to be line 40, which 
prints the message "YOUR NUMBER 
IS POSITIVE.", and the ignorance of 
the machine once again outmaneuvers 
the intelligence of man. 

In order to deal with all the 
possibilities, the programmer's instruc- 
tions to the computer on making the 
decision must be altered: 



10 PRINT "TYPE IN ANY 

NUMBER: "; 

20 INPUT N 

30 IF N < THEN GOTO 60 

35 IF N = THEN GOTO 65 

40 PRINT "YOUR NUMBER IS 

POSITIVE." 

50 GOTO 70 

60 PRINT "YOUR NUMBER IS 

NEGATIVE." 

62 GOTO 70 

65 PRINT "YOUR NUMBER IS 

ZERO." 

70 END 



This program will now be able to 
cope with every possible real number 
within the number-handling cap- 
abilities of the computer. 

The "IF.. .THEN" statement is even 
more versatile than the above example 
suggests. Since any valid BASIC state- 
ment can follow the "THEN", the 
above program could be made quite a 
bit neater and easier to follow by 
rewriting it in this way: 



10 PRINT "TYPE IN ANY 

NUMBER: "; 

20 INPUT N 

30 IF N> THEN PRINT "YOUR 

NUMBER IS POSITIVE." 

40 IF N < THEN PRINT "YOUR 

NUMBER IS NEGATIVE." 

50 IF N = THEN PRINT "YOUR 

NUMBER IS ZERO." 

60 END 

Since only one of the three lines 
30-50 can be true, only one of the 



PRINTS will be executed and the rest 
skipped. 

Or, yet another way of coding the 
program would be Hke this: 



10 PRINT "TYPE IN ANY 

NUMBER: "; 

20 INPUT N 

30 IF N >0 THEN PRINT "YOUR 

NUMBER IS POSITIVE.": GOTO 

60 

40 IF N < THEN PRINT "YOUR 

NUMBER IS NEGATIVE.": GOTO 

60 

50 PRINT "YOUR NUMBER IS 

ZERO." 

60 END 



This approach trades in one condi- 
tional branch for two unconditional 
ones (if that's your idea of a good 
bargain), illustrates the use of multiple 
statements on a hne, and is likely to in- 
crease execution speed shghtly. In most 
BASICS, when the condition checked 
by an "IF" is false, the program will 
continue at the next higher line, as 
mentioned above (Apple's Integer 
BASIC is an exception). This means 
that by judicious use of the colon (:), 
you can get the computer to do not just 
one but several things if the condition 
you're testing is true — skipping over 
all those things if the condition is false. 
This is not always the most desirable 
approach, but it comes in handy quite 
frequently, as in the above program. 

As usual, there are also other ways 
to skin a cat. (No offense intended to 
our feline readers.) Conditional 
branching can be accomplished 
through at least two other types of 
BASIC structures: the computed 
GOTO and the "ON.. .GOTO" state- 
ment (plus the corresponding 
GOSUBs). The Atari gives you both of 
these; the Apple gives you the com- 
puted GOTO in Integer and 
"ON... GOTO" in Applesoft; and the 
S-80 gives you "ON. ..GOTO". 

The computed GOTO allows you to 
branch to a line number which is deter- 
mined by the value of a variable or a 
formula. Here's a way to rewrite the 
number-evaluation program above us- 
ing the computed GOTO along with 
BASIC'S SGN function (which yields a 
+ 1, 0, or -1 depending on the sign of 
the number): 



10 PRINT "TYPE IN ANY 
NUMBER: "; 

SoftSide August 1981 



20 INPUT N 

30 S = SGN(N) 

40 GOTO 100 -I- 10 * S 

90 PRINT "YOUR NUMBER IS 

NEGATIVE.": GOTO 120 

100 PRINT "YOUR NUMBER IS 

ZERO.": GOTO 120 

110 PRINT "YOUR NUMBER IS 

POSITIVE." 

120 END 



The formula (100 -I- 10 * S) will yield 
a result of 90, 100, or 110 correspond- 
ing to values of -1, 0, and 1 for S; so 
those are the line numbers to which 
control can be passed by this computed 
GOTO instruction. 

One of the nice things about this 
kind of structure is being able to name 
various parts of your program 
(especially subroutines) by their line 
number. This is a form of self- 
documentation which can really help to 
make the flow of a program clear. For 
instance: 



10 BEGIN = 1000: GAME = 2000: 

ENDGAME = 3000 

20 GOSUB BEGIN 

30 GOSUB GAME 

40 GOTO ENDGAME 

1000 (etc. . .) 



The "ON.. .GOTO" statement, also, 
is useful for multiple-branching ar- 
rangements. Reprogramming the 
number evaluator again, it might look 
like this: 



10 PRINT "TYPE IN ANY 

NUMBER: "; 

20 INPUT N 

30 S = SGN(N) + 2 

40 ON S GOTO 90, 100, 110 

90 PRINT "YOUR NUMBER IS 

NEGATIVE.": GOTO 120 

100 PRINT "YOUR NUMBER IS 

ZERO.": GOTO 120 

110 PRINT "YOUR NUMBER IS 

POSITIVE." 

120 END 

You can list as many line numbers 
following the GOTO (or GOSUB) as 
you can fit into a program line, and the 
control will branch to the first, second, 
third, etc., corresponding to the value 
of the variable named (S in this case). 

But what if the variable has some 

weird value, such as 4203 or -6.95? 

continued on page 23 

21 



MURA 



Mura's "HI STEPPER" is a pocket size AM/FM/FM Stereo Radio 
designed tor people on the move. "HI STEPPER" features include • 
Automatic and manual stereo switching • Slide rule tuning • Stereo 
balance control • LED stereo indicator • Powered by 3 AA batteries 
(that provide 10 times longer playing time than a 9V battery) or with DC 
adaptor • Built-in pocket/belt clip • Weighs only 9.1 oz. including 
batteries • Measures 1.2 x 3.1 x 4.7 in. • Carrying case included. The 
"HI STEPPER" is finished in a handsome ebony high gloss. 

The ultra lightweight headset (1.6 oz., less cord) is Mura's model hs. It 
has • Rare earth (samarium cobalt) drivers • Tapered mylar speakers 
• A 4 ft. lightweight cord with a 3.5mm plug. This has also features a 
foldable headband that permits compact storage and convenient carrying 
when not in use. 

#99-05 $59.95 

(plus $2.50 shipping and handling) 




TS6:HPiTOSID€ 

6 South Si .Millord. NH 03055 (6031673-5144 
TOLL FREE OUT-OF-STATE 1-8Q0.258-1790 





and other ^ 
undesirables ^ 




A bug has been reported in "International Bridge Contractors" 
(April, 1981, page 22). In line 255 the variables BS{Z) and BM(Z) 
should be set to 1(X)0 and 1500, rather than 100 and 150 as given. 
These variables represent the single-beam bridge's safe and max- 
imum lengths. 

"Math Decathlon," part 3 (May, 1981) has an error in line 6070. 
The line should read: 



6070 C - INT (RND(l) t 3 » (S(P) 
D) + 1: IF C = B THEN 6070 



2 + 



In "Bats" (June, 1981), when you win or lose the game, the com- 
puter displays the number of bats in the next round rather than in 
the current round. To correct this the following changes should be 
made: 



3010 Bl = B 
4010 Bl = B 
5005 PRINT 3960,' 



BftTS:"iBl) 




In both the Apple and Atari versions of "Kidnapped" published in 
the July SoftSide, the following lines should be changed: 

Atari 

1580 IF ft<)16 OR DPOO OR Dt(l,3)<>"SLE" THEN 1590 

2200 K3=56:R*="LIT FLASHLIGHT" sGOSUB 2500:H$(55tSfl+l,56ISA)="LIT FL 

ASHLI6HT ":DK=l!DT=0:S0T02880 

Apple 

855 IF A<13 AND E$ = "GHT" AND 1(54) = 1 THEN K3 = 56:R« = "LIT FLA 
SHLISHT"! GOSUB 1100!H$(56) = R$:DK = hDT = 0: GOTO 4900 



** REWARD! ** 
TRANSLATION APPEAL 

We will give away a $100 
software certificate each 
month for the best translation 
of a feature program in Soft- 
Side magazine. Furthermore, 
we will publish the translation 
in the magazine. Your port- 
folio will be enhanced and you 
will garner fame and fortune 
for your efforts! 

We will allow three months 
after initial publication of a 
program for the translation to 
be sent. After that time we will 
not accept entries. The quality 
of the translation will be judg- 
ed by the SoftSide editorial 
staff and the winning entry 
will be published the following 
month, i.e., four months after 
publication of the original 
program. 

Entries must be submitted 
on cassette or disk, accom- 
panied by documentation. 
Please enclose a self-addressed 
stamped envelope if you 
would like your entry returned 
to you. 

G 



22 



SoftSide August 1981 



The Sensuous 
Programmer 

continued from page 21 

Well, negative values are bad news: 
your program will crash with an in- 
sulting error message. Non-integer 
values will have only their whole- 
number component evaluated: 2.78 
would be treated as a 2, for example. 
Values which evaluate as 
(0.9999999999), or as a whole number 
greater than the number of Hnes listed, 
will cause control to "drop through" 
to the next higher line number, ignor- 
ing all the nice choices you've pro- 
vided. The moral, of course, is that 
you ought to anticipate all possible 
values of the variable you use in an 
"ON. ..GOTO" or "ON...GOSUB", 
to eliminate unpleasant surprises. For 
example: 



360 PRINT "PLEASE ENTER 

YOUR CHOICE (1, 2, OR 3):"; 

370 INPUT C 

380 IF C < THEN GOTO 360 

390 ON C GOTO 500, 600, 700 

400 GOTO 360 

500 (etc. . .) 



Line 380 traps an improper response 
(a negative number) which would cause 
the program to crash, and line 400 
"catches" all other responses that are 
either less than 1 , or equal to or greater 
than 4. There are other approaches to 
trapping such errors (and this one can't 
cope very well with a non-numerical in- 
put), but this illustrates one possibility. 

So much for branches, conditional 
and otherwise. Now you know how to 
tell your computer where to go, and 
how to give it decision-making power. 
With just a little freebie thrown in on 
trapping bad input. Next month, more 
on this last topic, with various hints 
and techniques designed to anticipate 
the unanticipated, can the uncanny, 
fool the foolish, and wittily outwit the 
half-wit. G 



5 Atari One Liner 

^ 1 CLOSE llrOPEM ll,4,0,'K:'!6ET II, N: 

5 FOR V=0 TO 3:S0UND V,N,10,l:NEn V:GR 

5 ftPHlCS 2+liiSETCOLOR I.N.NiPLOT RND(0 

S ltl4,RND(0ltl0:? l&i'ORSAN'iGOTO 1 



Jonathan Schiff 
Pasadena, CA 






Take a big byte of the Apple... 




48K RAM 
(#47-203). 



$1299.00 



...and keep nibbling at the edges with 
peripherais, available from TSE HARDSIDE... 



these 



SUP-R-MOD RF Modulator (#47-100) $34.95 

APPLE II Disk Controller w/Drlve (#47-004) $619.00 

APPLE II Disk Drive (#47-005) $499.00 

LOBO Disk Drive (#47-3101) $379.00 

MICROSOFT Z-80 SoftCard (#47-80) $269.00 

MICROSOFT RAMCard (#47-81) $159.00 

Integer BASIC Language Card (#47-10) $195.00 

PASCAL Language Card (#47-PAS) $459.00 

MOUNTAIN COMPUTER Apple Clock (#47-MH003) $269.00 

MOUNTAIN COMPUTER ROMWrlter (#47-MH015) $169.00 

MOUNTAIN COMPUTER ROMPIus w/Filter (#47-MH007) $189.00 

MOUNTAIN COMPUTER Music System (#47-MH022) $519.00 

MOUNTAIN COMPUTER A/D + D/A(#47-MH023) $329.00 

MOUNTAIN COMPUTER Expansion Chasis (#47-MH024) $609.00 

HARDSIDE Memory Upgrade Kit (#5-1 102) $39.00 

APPLE Silentype Printer w/lnterface (#47-000) $569.00 

Parallel Printer Card and Gable (#47-9) $100.00 

CCS Arithmetic Processor (#47-781 10) $399.95 

CCS Asynchronous Serial Interface (#47-771 OA) $159.95 

CCS Synchronous Serial Interface (#47-7721 A) $1 59.95 

CCS GPIB (IEEE-488) Interface (#47-7490A $300.00 

CCS Calendar/Clock Module (#47-7424A) $1 25.00 

LYNX Communications Interface (#19-85) $229.00 

KURTA APPLE Graphics Tablet (#47-1000) $659.00 

VERSAWRITER (#47-1 100) $239.00 

ALF AM-II Music Synthesizer (#47-1200) $189.00 

LEEDEX 12" B/W Monitor (#5-100) $159.00 

NEC 12" Monochrome Monitor (#5-200) $239.00 

Color Video Receiver (#26-3010) $389.00 

TERMS: Prices and specifications are sub|ect to ^^^^^^^^ . ^^ - . ^^^ 

change. TSE HARDSIDE accepts ViSA & ^^^^^^^^\ A^^l vka 

MASTERCARD, Certified cliecl<s and f^oney Bl%^^^Bb l^^KJ ^^^ 

Orders. Personal checks accepted {takes 3 weeks 

to clear). TSE HARDSIDE pays all shipping 

charges (within the 48 states) on all PREPAID ^pm% .^ ■ a.^^V^k*^ J% ■ V^^ 

orders over $100.00. On all orders under $100 a |^^k • I ■JOf^ri!^ I Ifl^ 

$2.50 handling charge must be added. GOD orders | ^/^^Bl^l^*H^d^^vl 1^^^ 

accepted (orders over $250 require 25%deposlt) g g ^^ St .Milford, NH 03055 (603)673-5144 

there Is a $5.00 handling charge. UPS Blue Label " ' 

and Air Freight available at extra cost. TOLL FREE OUT-OF-STATE 1-eOO-258-1790 




SoftSide August 1981 



23 




Quest 1 



by Brian Reynolds 

Apple translation by Rich Bouchard. 
Atari translation by Alan J. Zett. 

"Quest 1" is a graphics dungeon 
game which will run in 16K RAM on 
the S-80, or 24K RAM on the Apple or 
Atari. 

In "Quest 1" you become a strong 
warrior who journeys through an an- 
cient maze in search of four huge sap- 
phires and other treasures. These 
precious jewels are guarded by terrible 
Wraiths, Giants, Mummies, and other 
unpleasant monsters. To find the 
treasures, then, you must be very 
strong (to kill the monster), very dex- 
trous (to sneak around the monster and 
steal the treasure), or very intelligent 
(to list the program and cheat!). 

When you begin your quest, a 
character will be created for you. He 
(or she) will be either an Elf, a Dwarf, 
or a Human. He will be given ratings in 
strength (3-20) and dexterity (3-20), 
and a percentage rating according to 
his wounds (100% = no wounds, 
0% = a dead fighter). Being new to the 
field of questing, your warrior will not 
be much favored by the gods and will 
not have much magic to use. He will, 
however, have four different ways to 
fight: He will be given a random 
number of normal arrows, magic ar- 
rows, and holy water, plus his trusty 
sword. Some healing potions will also 
be given for restoring wounds. 

After you have named your fighter, 
you will be teleported into a 
marketplace in a nearby town to 
bargain with a greedy merchant for 
more supplies. This usually takes only 
a short time, since the merchant will 
probably either sell to you quickly, or 
else refuse to sell at any kind of af- 
fordable price. After completing your 
bargaining, enter a '0' to begin your 
quest. 

When you enter the dungeon, a text- 
graphics display will be created on the 
screen, showing all your statistics in the 
corners and a picture of your current 
location in the center. If you have an 
S-80 Model III, your character will 
look different depending on his/her 
gender. On the Model I and on the Ap- 
ple, both male and female characters 
are represented by an '@' symbol. And 
in the Atari version, a specially-defined 
text character is used. (Watch for an 
upcoming article on creating such text 

continued on next page 
25 



continued from previous page 

characters yourself.) Treasure chests 
appear as asterisks (*), while monsters 
are shown by the initial letter of their 
name. 

You can attempt your quest through 
the 58 rooms of the dungeon simply by 
killing monsters, taking the treasures, 
and moving on. However, this is not 
advisable for two reasons. First, you 
must remember the way out of the 
dungeon, or you will surely perish. 
And second, wandering monsters 
abound in this dungeon; if a wraith, 
for example, comes up behind you, he 
will probably kill you with one good 
blow. You should also be aware that 
frequent trips back for supplies are not 
wise, since more monsters are added 
each time you re-enter the dungeon 
with more than 100 experience points. 

Note that the greater your dexterity 
rating, the more SLOWLY the game 
will seem to move. This is because your 
higher dexterity, in effect, gives you 
more time to think and react relative to 
the pace of the game. As you ac- 
cumulate experience points, however, 
the pace and difficulty of the game will 
increase. 

When you find your way out of the 
dungeon, the computer will give you a 
list of all the treasures you retrieved, 
add in any arrows or potions you may 
have found, give you a chance to save 
the game, and let you quit if you want 
to. If you do quit, the computer will 
give you a list of all your fighter's 
abilities and possessions so that you 
can use him in a later game. If you elect 
to continue, you are teleported back in- 
to the marketplace to get more supplies 
and then to continue your quest. 

Commands are entered with single 
keystrokes, as follows: 

S-80 version 

The number keys are convenient if you 
have a numeric keypad: 

8 or up-arrow: Move up. 
4 or left-arrow: Move left. 
6 or right-arrow: Move right. 
2 or down-arrow: Move down. 



Apple and Atari versions 



The keys form a diamond shape: 

W: Move up. 
A: Move left. 
D: Move right. 
X: Move down. 



All versions: 



Any key other than above: Stop 
movement. 

N: Shoot a normal arrow (not effec- 
tive against Wraiths). 
M: Shoot a magic arrow. 
T: Toss a vial of holy water (affects 
only "undead" monsters: Skeletons, 
Zombies, Ghouls, Mummies). 
F: Fight in close combat (not effec- 
tive against Giants or Wraiths). 
O: Open a treasure chest when you 
are next to it. (It will disappear and 
its contents will be displayed on the 
screen.) 

H: Drink a healing potion. (This 
restores your wound rating to 100%.) 



Below is a complete inventory of the 
monsters, with their wound ratings. 
These ratings represent the monster's 
strength, relative to your initial 
strength. If you are attacked, by a 
skeleton for example, it can inflict 
wounds of up to 20% on you with each 
hit. And, it takes more to kill a 
monster with a high rating than one 
with a low rating. 

Skeleton: 20% 
Ore: 30% 
Zombie: 40% 
Ghoul: 50% 
Spider: 70% 
Mummy: 80% 
Giant: 90% 
Wraith: 99% 



VARIABLES: 

Al: Number of normal arrows. 
A2: Number of magic arrows. 
DX: Dexterity rating. 
EP(*): Experience value of each 
treasure. 

GP(*): Gold value of each treasure. 

HW: Number of vials of holy water. 

M$(*): Single-character monster 

identifier. 

Ml(*): Type of monster in each 

room. 

M2(*): Number of monsters in each 

room. 

MN$(*): Names of the monsters. 

MS(*): Standard wound value for 

each monster. 

NM$: Name of fighter character. 

OP: Original price of an item at the 

market. 

PI : Current price of an item at the 

market. 

PT: Number of healing potions. 

Rl(*): Identifies each location as 

either a passage/intersection ( = 1) or 

a chamber/room ( = 2). 

R2(*,*): For each room, identifies 

what room you will enter by exiting 

up, down, left, and right respectively. 

RC: Race of fighter (0 = Human, 

l=Elf, 2 = DwarO. 

RM: Current room number. 

ST: Player strength. 

T$(*): Name of each treasure. 

Tl(*): Identifies type of treasure in 

each room. 

TRS80MODEL: Model number of 

computer (S-80 version). 

TS(*): Quantity of each treasure type 

retrieved by player. 

TX,TY: X and Y coordinates of 

treasure. 

W: Wounds (multiply by 100 to get 

percentage). 

WX.WY: X and Y coordinates of 

monster. 

X5,Y5: X and Y coordinates of 

player. 

YY$: Single-character identifier for 

player. 



S-80 VERSION 



Print title page, 



1 CLS:CLEflR40O;IFPEEK(664)=5BaNDPEEK(6i5)=liTHENTRS90n0DEL=3£LEE 
TRS80I10DEL=1 

2 PRINTS476, "QUEST l"i !lFTR38CI10DEL=3THENP0KEI4420, 1 

3 flt=" t » « I « « I « « » U E S T 1 W 
AS WRITTEN BY B R I ft N R E Y N 3 L D 5 til 
I » M « I « (HAVE FUN') " 

4 FORX=1TQLEN(A$)-14:PRINT3537,I1ID«(A»,X,14);;FCRY=1T030:NEKT;NE 
UiPRINT 

5 ON ERROR GOTO 30000 

6 FQR)t=lT01000!NEn 



7 PRINT 

8 IFTRS80MDDEL=1THENYYJ="«"EL5EIFTRS80MDDEL=3THENYY$=CHR$(253) 

Data <or inonsterB and treasures. 

100 DATA "WORTHLESS ODDS i ENDS", 0,0, "A BAG FULL OF COPPER COINS 

",1,3, "A SMALL BRASS STATUETTE", 2, 5, "A BAG FULL OF VARIOUS COINS 

",3,7, "A PURSE FULL OF GOLD C0INS",5,12, "3 GOLD NUGGETS ",B, 

17, "4 SMALL TURQUOISES", 7, 15, "LARGE RUBY ",15,30 

105 DATA "A >HUGEt SAPPHIRE", 150, 150, "A HEALING POTION", 10,0, "A 

QUIVER OF 10 MAGIC ARROWS", 15,0, "A QUIVER OF 10 NORMAL ARROWS",! 

0,0 



26 



SoflSide August 1981 



110 DATfi"SKELET0N","S",2,"0R[:","0",;,"Z0HBIE",":",4,"SH0UL","g", 


T$(12),EP(12),6F(12) 


6, "HUGE SPIDER","H",7,"HUf!(1Y","l1",8,'GlHNT","6",9,"WRAITK","r',9 


603 F0RX=1T012:READT$I)(),EPIX),GP(X);NEXTX 


.9 


605 FaR); = lT08;READMN$()!) ,l1tlK) ,MS(X) :NEXT 




610 F0RX=1T058!READR1(X);F0RY=1TD4!READR2(X,Y)!NEXTY 


Data for the rooms, 


615 READI11(X),I12(X),T1(X):NEXTX 




620 RI1=l:Al = 1000!A2=1000:W=liPT=2 


115 DATA 1,12,3,2,18,0,0,0 


625 IFTRS80t10DEL=3THENPOI':E16409, 1 


120 DATA 2,0,0,0,1,4,2,8 




125 DATA 1,1,0,4,19,0,0,1 


Use an old character? 


130 DATA 1,0,0,5,3,3,1,1 




135 DATA 2,6,38,0,4,1,3,6 


800 IFB1=1THENG0SUB20000 


140 DATA 1,8,5,9,7,0,0,0 


805 IFB1=1THENB1=0!G0T0900 


145 DATA 1,0,0,6,0,0,0,1 


810 INPUT"DQ YOU WISH TO USE AN OLD CHARACTER":.A$ilFLEFT»(A$,l) 


150 DATA 2,0,6,0,11,2,11,2 


(;"Y"THEN60SUB21000:G0T0900 


155 DATA 2,0,0,10,6,2,3,1 


811 IFTRS80(10DEL=3THENP0KE16409,0 


160 DATA 2,0,0,0,9,5,1,4 


812 INPUT"NAflE ";NM$ 


165 DATA 1,0,0,8,12,0,0,1 


813 IFTRS80t10DEL=3THENPOKE16409,l 


170 DATA 2,0,1,11,13,2,5,3 


815 INPUT"STRENGTH ";ST: IFST>200RST<3THEN815 


175 DATA 1,0,0,12,14,0,0,1 


820 INPUT"DEXTERITY "iDX; IFDX>200RDX<3THEN820 


180 DATA 2,15,26,13,17,5,1,1 


825 INPUT"W0UNDS ";W:W=W/100:IFW<. 10RW>1THEN825 


185 DATA 2,0,14,0,0,0,0,1 


830 INPUT"EXPERIENCE ";EP: INPUT"G0LD; "jGR 


190 DATA 2,0,17,0,0,1,2,5 


835 INPUT"IS (S)HE AN ELF";At!lFLEFT$(At,l)="Y"THENRC=l 


195 DATA 1,16,20,14,0,4,1,1 


836 IFRC=OTHENINPUT"IS (S)HE A DWARF"jA$:IFLEFT$(A», 1)="N"THENRC 


200 DATA 2,0,19,1,26,2,2,7 


=2 


205 DATS 2,18,30,3,27,3,2,2 


840 1NPUT"I1AGIC ARROWS "iA2:INPUT"N0RI1AL ARROWS "jAl 


210 DATA 1,17,21,0,0,0,0,1 


845 INPUT"HEALING POTIONS ";PT 


215 DATA 1,20,22,0,0,6,2,9 


846 INPUT"HOLY WATER "jHW 


220 DATA 1,21,23,0,0,2,3,12 


847 IFTRSaonODEL=3THENINPUT"Is this character feinale";A»:IFLEFT» 


225 DATA 1,22,24,0,0,4,2,10 


(A»,1)="Y"THENYY»=CHR$I254) 


240 DATA 1,23,25,34,0,0,0,11 




250 DATA 2,24,0,0,0,7,3,9 


Load in an old gate? 


260 DATA 2,14,0,18,0,3,2,1 




270 DATA 2,0,28,19,0,4,1,2 


850 INPUT"Do you wish to load in an old gaiie"|A«!lFLEFT$(A«,li<> 


280 DATA 1,27,29,31,0,0,0,1 


"Y"THEN900 


290 DATA 2,28,0,0,0,5,1,10 


860 lNPUT"Froi« cassette or disk ";A$;IF LEFT$(A$,1)="C"THENINPUT 


300 DATA 2,19,0,0,0,1,2,3 


"PRESS ENTER TO BEGIN LOAD "jA$:60T0880 


310 DATA 1,0,32,0,28,0,0,4 


862 IF LEFT$(A$,1)<>"D"THEN860 


320 DATA 1,31,33,43,0,0,0,1 


870 OPEN" I", 1, "QUEST/DAT" 


330 DATA 2,32,35,0,0,5,1,8 


872 F0RX=1T058:INPUT«1,M1(X),M2(X),T1(X);NEXT 


340 DATA 1,0,0,35,24,0,0,12 


876 CLOSE: G0T09O0 


350 DATA 1,33,36,45,34,0,0,5 


880 F0RX=lT05B;INPUT)t-l,ftl(X),M2(X),Tl(X):NEXT 


360 DATA 1,35,0,37,0,7,1,10 




370 DATA 2,0,0,0,36,8,3,9 


Harketplace and bargaining routine. 


380 DATA 1,5,49,0,39,0,0,1 




390 DATA 1,0,40,38,0,0,0,6 


900 CL5iPRINT"Gold: "iGP 


400 DATA 1,39,0,0,41,2,3,2 


901 PRINT'You are at the market. Prices here are;" 


410 DATA 1,42,46,40,43,4,1,7 


902 PRINT 


420 DATA 2,0,41,0,0,7,3,8 


Ortt DDTUT"! Manir hrrntA -- 


tUo rKiNi I, nagic Hrrow 


430 DATA 2,0,44,41,32,6,1,11 


-- 2 gold" 


440 DATA 1,43,45,0,0,0,0,5 


Q{\A PtJTMTI'O J Hnrmal arrnue --___- -_-_ — __„_■_„ 


tUI rniNi I, 'i Nornai arrows — ' 


450 DATA 1,44,0,47,35,0,0,1 


-- 1 gold" 


460 DATA 2,41,47,48,0,5,1,7 


Qf\t^ PDTMT"T UiBsl i nn nnVirtn _-.-„ --_ 


tUj rKiNi J. Healing potion 


470 DATA 1,46,0,50,45,0,0,3 


- 15 gold" 


480 DATA 1,0,0,49,46,0,0,1 


OAA PR1MT"J Unlu uafor 


7V0 mpii *i. nuiy Hater ---- - 


490 DATA 2,38,51,52,48,6,1,6 


-- 3 gold" 


500 DATA 1,0,0,51,47,2,5,10 


910 PRINT" Ok, ";NM»j", what item would you like (nui!ber)"|:iNPU 


510 DATA 1,49,0,53,50,4,3,5 


TIT:IFIT>40RIT<0PRINT"I don't sell THAT.";GQT0910 


520 DATA 2,0,0,0,49,6,1,6 


911 IFIT=0THEN990 


530 DATA 2,0,54,0,51,5,1,8 


912 IFIT=1THENP1=2ELSE!FIT=2THENP1=1ELSEIFIT=3THENP1=15ELSEIFIT= 


540 DATA 1,53,0,0,55,0,0,1 


4THENP1=3 


550 DATA 2,0,0,54,56,2,3,2 


915 PRINT" At "jPl;" gold apiece, how nany will you buy"|:INPUTN 


560 DATA 1,0,0,55,57,6,1,8 


H:IFNH<lTHENPRINT"Very funny, I do not BUY things, I SELL then," 


570 DATA 1,0,0,56,58,7,3,11 


:G0T0915 


580 DATA 2,0,0,57,0,8,4,9 


920 P1=PUNM 




921 0P=P1 


Initialize variables. 


925 PRINT"The price now comes to "|P1;" gold." 




930 PRINT"How much will you give me, "iNfUpINPUTA 


600 DIM MN»(8),l1$(B),l1S(8),R115a),R2(53,4),«l(5B),M2(58),Tl(58), 


continued on next page 



SoftSide August 1981 



27 



continued from previous page 

935 IFft<(0P/10)THENPRINT"F0R6ET ITl " I ":30T0'?01 

940 IFA<0P/2THENPRINT"Not interested. ":G0Ta901 

941 IFA>=PlTHENPRINT"You got a deal 1 1 !":60T0950 

942 y=A/Pl:)(=RND(0):IF)(>YTHENPRINT"Not interested":Pl = lNT(IOP+Pl 
1/2):GQTQ930 

945 Pl=INT((Pll2+fi)/3)!PRINT"How about ";P1;", ")NI1«| "■^":G0T0930 

950 IFGP<PlTHENPRINT"|ilhat!'l Can't pay yer debts?^'' You'll be th 

roKH in prison (or this, "|NI1$|"! ! I";END 

955 GP=eP-Pl:PRINT"You noH have "iGP;" gold, "|Nh»;"." 

9t0 IFIT=lTHENft2=A2+NI1 

965 IFIT=2THENAI=A1+NI1«4 

970 IFIT=3THENPT=PTtNn 

975 1FIT=4THENHW=H«+NM 

980 GCT0901 

Enter dungeon; check for too many arrows. 

990 PRINT'Ok, ";NIU|", Press (ENTER) to go into the dungeon." 

991 EL=0 

992 IFEP>100THENEP=EP-100:EL=EL+100!FQRX=lT058iH2a)=l12()()«l.l:N 
EXT:G0T0992 

993 EP=EP+EL 

994 1FEL>500THENFQRU=ELTQ500STEP-100:FGR1(=1T053:(12(X)=«2(){)/1.1: 
NEXT:NEn 

995 INPUTA$:CLS 

997 A3=0:A4=0 

998 lFfi2>ST«2THENA4=A2-5TI2!A2=ST«2:PRINT"M0RE THAN ";STJ2|" MAG 
IC ARROWS MOULD WEIGH YOU D0WN.":F0RX=1T01000:NEXT 

999 IFAl>ST«2THENfl3=Al-STJ2:Al=ST«2!PRINT"l10RE THAN "|ST«2|" ARR 
0W3 MOULD WEIGH YOU DQMN.":F0RX=1T01000:NEXT 

Upon entering a new rooi, draw it with its lonsters and 
treasures. H this is room one, give option to leave. 

lOOC CLS 

1001 !FBl=OTHENBl=lELSElFRM=lTHENINPUT"Do you wish to leave the 

dungeon"; A$;lFLEFT$(A»,l)="y"THENBOOELSECLS 

1005 ONRKRIDGOSUBIOOOO, 11000 

1010 IFTllRM)>0THENTX=RND(39-231+23:TY=RND(4)t5:PRINT8TX+i4«TY," 

I"; 

1015 X5=31:Y5=8 

1020 IFI$="8"THENY5=14EL5EIF1$="2"THENY5=1ELSEIFI»="6"THENX5=1EL 

SElFI»="4"THENX5=i2 

1025 FRlNT3X5+i4«Y5,YY$; 

1030 IFN2(RI1)>=lTHENWX=RND(39-23)+23;WY=RND(41+5 

1031 l1S=MS(MllRm)/10 

1050 IFH2(Rf11>=lTHENPRINT9WX+64»WY,IU(Ml(RH))i 

Print player status, check for wandering monsters. 

1055 PRINT30, "ARROWS! ";A1;!PRINT5192,"M. ARROWS: ";A2; 

lOiO FRINT3960,"ST=";ST;" DX=';DX;!PRINT864, 'WOUNDS: ";LEFT$(STR 

$(M«100),6);"7. "; 

1061 PRINTJ12B,"R00ll! ";RN; 

1062 PRINT3B32, "HEALING POTIONS: ^PT; 

1063 FR1NT3896,"H0LY WATER: ";HW; 

1065 IFH2(RI1)>=1THENPRINTJ42,"HQNSTER: ";(1N$(ni(RI1)) ; 

1070 lFfl2(RH)<lTHENPRINTJ42,STRING» (64-42, 128); 

1075 lFI121RM)>lTHENPRlNTJ42+64, "NUMBER: "; INT(M2(RM) );:ELSEPRINT 

}42t64,5TRING$(20,128); 

lOBO PR1NT8704,"EX POINTS: ";INT(EP); 

1085 PRINTJ768,"G0LD: ";GP; 

1086 IFM2(RM)=0ANDRND(100> = 1THENF0RX=1TQ10:PRINT842, "Wandering M 
onster ! "; :F0RY=lT050:NEXTiPRINTJ42, " " ; : FORY= 
1TG50:NEXT:NEXT:M2(RH)=RND(3):M1(RM)=RND(8):GQTQ1030 

Accept a command from keyboard and call appropriate subroutines. 



1090 F0RX=1T0(DX«10)-EP!A»=INKEY$:IFA»="''THENNEXTELSEX=355Q;N£XT 

1093 IFTl(RM)>0THENPRINT3TX+64«TY,"r; 

1095 IFA»<>""THENIFA$="["THENI$="8"ELSE1FA«=CHR$(10)THENI»="2"EL 

SElFA»=CHR$(91THENU="6"ELSEIFA«=CHR$(8)THENI»="4'ELSEIt=A» 

1100 IFU="8"THENG05UB15100 

1105 IF1»="2"THEN60SUB15200 

1110 1FI$="6"THENGOSUB15300 

1115 1FI$="4"THENG0SUB15400 

1120 IFI$="H"THENI$="":IFPT>0THENPT=PT-1:W=1 

1125 IFI$="M"ANDA2>0THENI$=""iA2=A2-l:GDSUB15500 

1130 IFl»="N"ANDAl>0THENI»="":Al=Al-l:G0SUB15i00 

1135 1FI$="F"THENG0SUB16000 

1140 IFU="0"THENGQSUB17000 

1145 IF1$="T"ANDHW>0THENU="";HW=HW-1;G0SUB 13000 

If there is a monster in the room, move him and let hiu attack, 

1200 IFM2(RM)<1THEN1030 

1201 IFMS(=0THENF0RX=191T0128STEP-l;PGKE15360tMX+(64«WY),X:NEXT: 
M2(RM)=M2(RM)-l:EP=EP+HS(Ml(RM)i:G0T0 1030 

1205 IFWX>X5THENt1X=-lELSEIFWX(X5THENMX=lELSEMX=0 

1210 IFWY>Y5THENMY=-lELSEIFWY<Y5THENnY=lELSEMy=0 

1215 PRINTJWX+64«WY," "; 

1220 IFPEEK(15360+WX+MX+64«WYl=1280RPEEK(15360tWX+MX+64«WY)=32TH 

ENWX=MXtMX 

1225 IFPEEK(15360+64»(MYtMY)+WX)=1280RPEEK(15360t64»(WY+MYi+WX)= 

32THENWY=WY+MY 

1230 IF(ABS(WX-X5)>l)0R(AB5{WY-Y5)>l)THENlO50 

1235 X=RND(01:IFX>MSTHEN1050 

1240 X=RND(0)tMS 

1245 W=W-X:IFW<0THEN5000 

1250 GOTO 1050 

End-routine for the "Great Dungeon in the Sky" ending. 

5000 F0RX=191TG123STEP-l:P0KE15360+X5+64l¥5,X:NEXT:F0RX=lTai00C; 

NEXT:CLS 

5005 PRINT"MELCOME TO HEAVEN, ";NM$;"'l'" 

5010 PRINT"! hope you enjoyed your short lifetime in which" 

5015 PRINT"You accumulated "|GP;" gold and ";EP;" esperience poi 

nts." 

5020 PRINT:PRINT:INPUT"Would you like to be reincarnated as a ne 

N character";A$;IFLEFT$(A«,l)="N"THENENDELSERUN 

Subroutine to draw a passage/intersection, 

10000 REM 

10005 X1=R21RM,1) 

10010 IFXl>0THENF0RX=0T0320STEP64:PRINT3X+23,CHRt(191);;PRINT3X+ 

40,CHR»(191);:NEXTELSEPRINT3343, STRING* (18, 188); 

10015 X1=R2(RM,2) 

10020 IFX1>OTHENFORX=640T0960STEP64:PRINTJX+23,CHR«(191)+STR1NG< 

116,12B)+CHRM191);:N£XT!ELSEFRINT3663,STRINB$(18,143); 

10025 X1=R2(RM,3) 

10030 IFXl>OTHENFGRX=41T063:PRINT3320+X,CHRJ(188)i!PRINT3a40+X,C 

HR$(143);:NEXT:ELSEF0RX=384T0576STEP64:PRINT3X+40,CHR»(191);;NEX 

T 

10035 X1=R2(RM,4) 

10040 IPX 1 >0THENFQRX=0T022: PR!NT3320tX , CHR$ ( 188) ; : PRINT3640+X, CH 

R$(143);!NEXT:ELSEFQRX=384T0576STEP64!PRINT3Xt23,CHR$(191);:NEXT 

10045 RETURN 

Subroutine to draw a chamber/room. 

11000 REM 

11005 PRINT3192+16,CHRJ(191)+STRING»(7,143!+STRINGt(U,12B)+STRl 

NG»(7,143)+CHR$(191); 

11010 PRINT376B+16,CHR$(191)+STRING$(7,133)+STRINB$(16,12B1+STRI 



28 



SoftSide August 1981 



NG$(7,lSS)+CHR$(191)jiFQRl(=192T0320STEP64!PRINTSl{+14,CHR$(191)ji 


15698 RETURN 


PRINTSX+47,CHR$(191);;NEXT:F0ii)t=640TD768STEP64:PRINT3X+16,CHR$n 




?l)|;PRINT.vl(+47,CHR»tl91)j;NEn 


Calculate monster range, aim, and shoot arrow graphically. 


IIOIS )(l=R2(RM,li 




11020 IFXl)0THENF0R)(=0T012BSTEP64:PRINT3)lt23,CHR»(191)+STRINGJ(l 


15699 IFWX=0THENWX=31 ; IFWY=OTHENWY=a 


i,123)+CHR»(191);;NEXT;ELSEPRINT3192f24,STRING$(16,143); 


15700 X6=X5»2-l:Y4=Y5>3-2:X7=WX»2-l:Y7=WY»3-2 


11025 X1=R2(RH,2) 


15701 IFX6=X7THENSL=0;X8=X7:X9=X6ELSESLP=(Y6-Y7)/!X4-X7):X8=X4:X 


11030 IFU>0THENFQRX=832TQ9i05TEP64:PRINT3X+23,CHR»(191)+STRIN6» 


9=X7 


(16, 1281 +CHR$( 191) J :NEn;ELSEPRINTS748+24, STRING* (16, 188)1 


15702 GOTO 15706 


I103S X1=R2(RM,3) 


15705 IFX6>X7THENSLP=(Y4-Y7)/1X6-X7):X8=X6!X9=X7;ELSEIFX7>X6TH£N 


11040 IFXl>0PRINTJ320+48,STRING$(14,188)i!PRINT3i40H8,STRING>(l 


SLP=IY7-Y4)/(X7-X4)!X8=X7:X9=X6!ELSESL=0:X8=X7!X9=X6 


6, 143) 1 iEL3EF0R)(=384T0576STEP64:PRINT3U47,CHR$(191) ; iNEU 


15706 Y8=Y6:Y9=Y7 


11045 X1=R2(RM,4) 


15707 Y=Y8 


11050 IFX1>0PRINTJ320, STRING*! 16, 188) j:PRINT8640,STRING$(16, 143) 


15708 SL=SL«SGN(Y8-Y9) ; 1FY4<Y7THENSLP=-SLP 


;!ELSEF0Rl(=384TQ576STEP64:PRINT3U16,CHR$(191)i:NEXT 


15709 IFX4>X7THENSLP=-SLP 


11055 RETURN 


15710 F0RX=X8T0X9-1STEPSGN{X9-X3) 




15711 IFY>470RY<0QRX>1270RX(0THENNEXT!G0T015750 


Subroutines lor moving player around screen. 


15715 IFP0INT(X,Y)=-1THENX9=X-1:G0T015750 




15720 SET(X,Y):Y=Y+SLP:NEXTX 


15100 IFY5=0THEN15105ELSEI1=PEEK(15360+X5+((Y5-l)«64)):IFft=32QR«= 


15750 Y=Y8:FORX=X8T0X9-lSTEPSGN(X9-X8):RESET(X,Y);Y=YtSLF:NEXTX 


128THEN15105ELSERETURN 


15740 RETURN 


15105 PRINTJX5+64tY5," "; 




15110 Y5=Y5-1:IFY5<1THENRI1=R2(RM,1):G0T01000 


Subroutine for close combat with a monster. 


15120 PRINTJX5+64IY5,YY$jiRETURN 




15200 IFY5=15THEN15205ELSEI1=PEEK(15360+X5+((Y5+l)t44))!lFH<>32flN 


14000 IFABS(X5-WX)>10RABS(Y5-WY)>1THENRETURN 


DI10128THENRETURN 


14001 IFHl(Rh)=8THENRETURN 


15205 PRINT3X5+64«Y5," "; 


16002 IFM1(RI1)=7THENRETURN 


15210 Y5=Y5+l!lFY5>14THENR(1=R2(RH,2):G0TQ1000 


16003 IFI11(RM)=6THENW=W-,05 


15220 PRINTJX5+64«Y5,YY$;:RETURN 


16005 X=RND(0)iIFRC=OTHENX=X-.l 


15300 IFX5>61THEN15305ELSEI1=PEEK(15340+X5tl+64IY5):IFn<>32flNDI1<> 


16006 X=X-(DX/100) 


128THENRETURN 


16007 IFRC=2THENX=X-.3 


15301 l1=PEEK(15360+X5+2+64«Y5):IFI1<>32flNDn<>128THENRETURN 


16008 X=X-1EP/1000) 


15305 PR1NT3X5+64IY5," "; 


16010 IFX>WTHENRETURN 


15310 X5=X5+2:1FX5>61THENRM=R2(RI1,3):GOT01000 


14015 X=RND(0):IFRC=OTHENX=X+.l 


15320 PRINTiX5+64IY5,YY»|:RETyRN 


14014 X=X+(ST/100) 


15400 iFX5(2THEN15405ELSEN=PEEK!15360+X5-l+64JY5)!lFM<>32fiNDM<>l 


14017 IFRC=2THENX=Xt.2 


23THENRETURN 


14020 HS=I1S-X;RETURN 


15401 l1=PEEK(15340+X5-2+64«Y5)!lFI1<>32flNDI1<>128THENRETURN 




15405 PRINTJX5+64IY5," "| 


Subroutine for opening a treasure chest. 


15410 X5=X5-2: IFX5<2THENRI1=R2(RM,4) sGOTOlOOO 




15420 PRiNTJX5+64«Y5,YY»|!RETURN 


17000 IFABS(TX-X5)>1THENRETURN 




17005 IFflBS(TY-Y5)>lTHENRETURN 


Normal arrow firing routine. 


17010 PRINT8TX+44JTY," "; 




17011 TX=0!TY=0 


15500 G0SUB15699 


17015 PRINT3a32+41,T$(Tl(RM));:FDRX=lT01000iNEXT 


15505 X=RNO(0)/2:IFRC=1THENX=X-.1 


17020 FaRX=41T043!PRINTJ832+X," "jiNEXT 


15506 IFRC=2THENX=X+.l 


17021 IFTl(R(1)=10THENPT=PT+l;G0T017024ELSEIFTl(RM)=llTHENft2=A2+l 


15507 X=X-(EP/1000) 


0!GOT017024ELSEIFTl(RM)=12THENAl=Al+10iGOTQ17026 


15510 X=X-.2 


17024 TS(Tl(RI1))=TS(Tl(Rm) + l 


15511 X=X-(DX/100) 


17025 GP=GP+GP(T1(RI1)) 


15515 IFX>WTHENRETURN 


17026 EP=EP+EP!T1(RM)):T1(RH)=0 


15520 X=RND(0)iIFRC=lTHENX=X+.2ELSEX=X+.l 


17030 RETURN 


15521 IFRC=2THENX=X-.l 




15525 I1S=I1S-X:RETURN 


Subroutine to throw a flask of holy water. 


15599 RETURN 






18000 f1=Ml !RM) : IFt1=2QRM=50RI1=7THENRETURN 


Nagic arrow firing routine. 


18005 G0SUB15499iPRINT3WX+(64«WY)," ";:lilfi=WX;WB=WYiWX=X5!WY=Y5;G 


15600 GDSUB 15499 


QSUB14000:WX=WA:WY=WB:PRINT8X5+(44n5),YY$;! RETURN 


15601 IF(11(RH)=STHENRETURN 

15405 X=RND!0)/2;IFRC=1THENX=X-.1 


Take care of "end of quest" procedures such as saving games on 
tape and printing out information on the player's fighter, 


15606 X=X-(DX/100) 




15607 IFRC=2THENX=X+.l 

15608 X=X-(EP/1000) 
15610 IFX>WTHENRETURN 

15620 X=RND(0)!IFRC=1THENX=X+.1 

15621 IFRC=2THENX=X-.l 
15625 MS=MS-X! RETURN 


20000 INPUT"WDuld you like to see the treasures you retrieved"iA 
$:IFi.EFT»(A»,l)="Y"THENF0RX=lT09!PRINTT$(X), "Number retrieved; " 
;TS(Xi:NEXT 

20010 FORX=1T09:TS(X)=0!NEXT 

20011 A1=A1+A3:fl2=ft2+A4 

continued on next page 



SoftSide August 1981 



29 



continued from previous page 

20015 INPUT"Would you like to save this gai«e"|A$:IFLEFT$(A$,l)<> 
■■y«THEN2002a 

20018 INPUT"To cassette or disk ")M:\f LEFT«(A»,1) = "C"THENINPUT 
"PRESS ENTER TO BEGIN SAVE "jA$:G0TD20024 

20019 IFLEFT$(fl$,l)<>"D"THEN20018 

20020 QPEN"Q",1, "QUEST/DAT" 

20021 F0Rl(=lTD5S:PRINTtl,Ml()();l12a)iTlU):NEn 

20022 CL0SE:G0TQ20027 

20024 F0RX=lT05B:PRINT»-l,ni(K),H2(X),Tl(l():NEn 

20027 PRINT"SAVE COMPLETE" 

20028 INPUT"Would you like to stop noH";A»:IFLEFT»(A$,l)<>"y"THE 
NRETURN 

20030 PRINT'Ok. So that you can use this character again:" 

20035 PRINT"Naiiie: ";N11$i" Race: "i:IFRC=OTHENPRINT"Hui«an":ELSEIF 

RC=lTHENPRINT"Elf";ELSEPRINT"DHarf" 

20040 PRINT"Wounds: "iWtl00;"r." 

20045 PRINT"Healing potions: "|PT;" Holy water; "jHW 

20050 PR!NT"firrows: "|A1;" Nagic Arrows: "iA2 

20055 PRINT"Gold: "jGPj" Experience: "|EP 

200i)0 PRINT"Strength: ";ST;" Dexterity: ";D)( 

20065 INPUT"Would you like to try again as a »NEW» character"|A» 

:IFLEFT$(A$,U = "Y"THENRUN 

20099 PRINT;PRINT"Caiie Questing again 50«etiiel I !":ENO 



Subroutine to create new fighter characters. 

21000 PRINT"Ok, I'll iake you one.":F0RX=lT01000:NEXT 

21005 GP=RND(201+5:ST=RND(17)+3:DX=RND(17)+3!RC=RND(3)-1:A1=3:A2 

=RND(10):PT=RND(3)+1:HW=RND(5):EP=0:W=1 

21010 PRINT"Strength: "jST;" Dexterity: 'jOX 

21015 PRINT"Gold; ";GPi" Healing potions: "jPT 

21020 PRINT"Holy water: "|HW!" Race: "i:IFRC=lTHENPRINT"EirELS 

EIFRC=2PRINT"Dwarf"EL5EPRINT"Hufflan" 

21025 PRINT"flrrows: ";A1|' Magic arrows: "|A2 

21027 IFTRS80I10DEL=3THENINPUT"I5 this character fe«ale"jA«:IFLEF 
TJ(fl»,l)="Y»THENYY$=CHRJ(254) 

21028 IFTR580MODEL=3THENPOKE16409,0 

21030 INPUT"What will you name this character";NH$:PRlNT"Have a 
<un Quest, "|NM»|" I ' !":FORX=1T01000:NEXT:CLS 
21035 IFTR530I10DEL=3THENP0KE16409, 1 
21040 RETURN 

Error-handling routine (for arrow-shooting FC errors). 

29999 END 

30000 IFERL=15750THENRESI)I1E15760ELSEIFERL=4096THENRESUMENEXTELSE 
PRINTERL,ERR/2+l:F0RXMTO10O0.NEXT:RESUMENEXT 



NOTE: User must hit [SYSTEM RESET] 
prior to every "RUN" of "Quest 1" to 
reinitialize the character set. 

Lines 1-9: Initialize character modification 

and print title page. 

Lines 100-112: Data for monsters and 

treasures. 

Lines 115-590: Data for the rooms. 

Lines 600-620: Initialize variables. 

Lines 800-846: Ask if you want to use an 

old character. 

850-884: Ask if you want to load in an old 

game. 

Lines 900-980: Marketplace and bargaining 

routine. 

Lines 990-999: Enter dungeon; check for 

too many arrows. 

Lines 1000-1050: Upon entering a new 



ATARI VERSION 

room, draw it with its monsters and 

treasures. If this is room one, give 

option to leave. 

Lines 1055-1088: Print player status; check 

for wandering monsters. 

Lines 1090-1145: Accept a command from 

the keyboard and call appropriate 

subroutine. 

Lines 1200-1250: If there is a monster in the 

room, move him and let him attack. 

Lines 5000-5025: End-routine for the 

"Great Dungeon in the Sky" ending. 

Lines 10000-10045: Subroutine to draw a 

passage/intersection . 

Lines 11000-11055: Subroutine to draw a 

chamber/room. 

Lines 15100-15420: Subroutine for moving 

player around screen. 

Lines 15500-15599: Normal arrow firing 



routme. 

Lines 15600-15698: Magic arrow firing 

routine. 

Lines 15699-15760: Calculate monster 

range, aim, and shoot arrow graphically. 

Lines 16000-16020: Subroutine for close 

combat with a monster. 

Lines 17000-17030: Subroutine for opening 

a treasure chest. 

Lines 18000-18005: Subroutine to throw a 

flask of holy water. 

Lines 20000-20099: Take care of "end of 

quest" procedures such as saving games on 

tape or disk, and printing out information 

on the player's fighter. 

Lines 21000-21040: Subroutine to create 

new fighter characters. 

Lines 30000-30050: Redefines "&" to be a 

red block and "@" to be a man character. 



1 GOSUB 30000:? CHR$(125):P0KE 752, liP 
OSITION 15,6!'' " QUEST 1 " 

2 -> :? "QUEST 1 was written by Brian R 
eynQld5":0PEN »3,4,0,"K" 

3 ? !? " (ATARI translation by Alan J. 
Zett)" 

7 GOSUB 600:F0R M TO 276iTt(X)=" "sN 
EXT XiFOR t=l TO 88!MN$()()=" "iNEXT h 
YV$="3" 

8 FOR X=0 TO 9:TS(X)=0:NEXT X 

9 FOR X=l TO 49!K*(X,X)=CHR$(INT(RND(0 
)«32))!NEXT X!K$(49)=" " 

100 DATA Worthless odds and ends, 0,0, A 
bag of Copper Coins, 1,3, A small Brass 
Statuette, 2, 5 

102 DATA A bag o^ various Coins, 3, 7, A 

purse of Gold Coins, 5, 12,3 Gold Nugget 

5,8,17 

104 DATA 4 Sftall Turquoises, 7, 15, A lar 

ge Ruby, 15, 30 


106 DATA A «HUGE« Sapphire, 150, 150, A H 

ealing Potion, 10,0 

108 DATA 10 Magic Arrows, 15,0, 10 noma 

1 ArroN5,10,0 

110 DATA SKELETON, S, 2, ORC, 0,3, ZOMBIE, Z 

, 4, GHOUL, g, 6 

112 DATA HUGE SPIDER, H, 7, MUMMY, M, 8, GIA 

NT, S, 9, WRAITH, W, 9. 9 

115 DATA 1,12,3,2,18,0,0,0 

120 DATA 2,0,0,0,1,4,2,8 

125 DATA 1,1,0,4,19,0,0,1 

130 DATA 1,0,0,5,3,3,1,1 

135 DATA 2,6,38,0,4,1,3,6 

140 DATA 1,8,5,9,7,0,0,0 

145 DATA 1,0,0,6,0,0,0,1 

150 DATA 2,0,6,0,11,2,11,2 

155 DATA 2,0,0,10,6,2,3,1 

160 DATA 2,0,0,0,9,5,1,4 

165 DATA 1,0,0,8,12,0,0,1 

170 DATA 2,0,1,11,13,2,5,3 


175 DATA 1,0,0,12,14,0,0,1 
180 DATA 2,15,26,13,17,5,1,1 
185 DATA 2,0,14,0,0,0,0,1 
190 DATA 2,0,17,0,0,1,2,5 
195 DATA 1,16,20,14,0,4,1,1 
200 DATA 2,0,19,1,26,2,2,7 
205 DATA 2,13,30,3,27,3,2,2 
210 DATA 1,17,21,0,0,0,0,1 
215 DATA 1,20,22,0,0,6,2,9 
220 DATA 1,21,23,0,0,2,3,12 
225 DATA 1,22,24,0,0,4,2,10 

240 DATA 1,23,25,34,0,0,0,11 

250 DATA 2,24,0,0,0,7,3,9 

260 DATA 2,14,0,18,0,3,2,1 

270 DATA 2,0,28,19,0,4,1,2 

280 DATA 1,27,29,31,0,0,0,1 

290 DATA 2,28,0,0,0,5,1,10 

300 DATA 2,19,0,0,0,1,2,3 

310 DATA 1,0,32,0,28,0,0,4 

continued on page 32 



30 



SoftSide August 1981 










T3^ *•* 



/^fe 'j^*** ^>«»« -ifN.^ • 



«#%. i'f 



J 




continued from page 30 








330 ? "EXPERIENCE: ";: INPUT EP 


940 IF A<0P.'2 THEN ? "NOT INTERESTED," 


320 DATA 1,31,33,43,0,0,0,1 


832 ? "SOLD! "i! INPUT 6P 


:BOTO 901 


330 OATft 2,32,35,0,0,5, 1,8 


835 ■> "IS (S)HE AN ELF ";: INPUT At: IF 


941 IF A)=P1 THEN ? "YOU GOT A DEALI": 


340 DATA 1,0,0,35,24,0,0,12 


A$(1,1)="Y" THEN RC=1 


SOTO 950 


350 DATA 1,33,36,45,34,0,0,5 


836 IF RC=0 THEN ' "IS (S)HE A DWARF " 


942 Y=A/P1:X=RND(0):IF X>Y THEN '^ "Not 


360 DATA 1,35,0,37,0,7,1,10 


jiINPUT At:IF A$(1,1)="N" THEN RC=2 


interested. ":Pl=INT((0P+Pl)/2i!S0TQ 9 


370 DATA 2,0,0,0,36,8,3,9 


340 ? "MAGIC ARROWS: "): INPUT A2!? "NO 


30 


380 DATA 1,5,49,0,39,0,0,1 


RMAL ARROWS! ";: INPUT Al 


945 Pl=INT((Pl«2tA)/3):IF P1<=A THEN 9 


390 DATA 1,0,40,38,0,0,0,6 


345 ? "HEALING POTIONS: ";: INPUT PT 


41 


400 DATA 1,39,0,0,41,2,3,2 


846 ? "HOLY WATER: ";! INPUT HW 


947 ? "How about "jPl;", ";NMt;"?":GOT 


410 DATA 1,42,46,40,43,4,1,7 


850 ? "Want to load in an old game ";: 


G 930 


420 DATA 2,0,41,0,0,7,3,8 


INPUT A$!lF A$(1,1)<)"Y" THEN 900 


950 IF GP<F1 THEN ? :? "WHAT" YA CAN' 


430 DATA 2,0,44,41,32,6,1,11 


860 "■ "FROM CASSETTE OR DISr ";: INPUT 


T PAY YER DEBTS! "!^ "YOU'LL BE THROWN 


440 DATA 1,43,45,0,0,0,0,5 


At! IF fi$(l,l)="C" THEN ? "HIT (RETURN) 


INTO PRISON FOR THIS'";CHR$(253) :£ND 


450 DATA 1,44,0,47,35,0,0,1 


WHEN READY ":SOTO 830 


955 GP=GP-P1:'' "You now have ";GP|" GO 


460 DATA 2,41,47,48,0,5,1,7 


862 IF At(l,l)(>"D" THEN 860 


LD, ";NM» 


470 DATA 1,46,0,50,45,0,0,3 


370 OPEN )t2,4,0,"D:QUEST.DAT" 


957 IF IT=4 THEN HW=HW+NM 


480 DATA 1,0,0,49,46,0,0,1 


872 FOR X=l TO 58:INPUT tt2;Xl:rtl(X)=Xl 


960 IF IT=1 THEN A2=A2+NM 


490 DATA 2,38,51,52,43,6,1,6 


:INPUT *2iXl!M2(X)=Xl:INPUT «2;X1:T1(X 


965 IF IT=2 THEN A1=A1+NMI4 


500 DATA 1,0,0,51,47,2,5,10 


)=X1 


970 IF IT=3 THEN PT=PT+NM 


510 DATA 1,49,0,53,50,4,3,5 


874 GOTO 886 


980 GOTO 901 


520 DATA 2,0,0,0,49,6,1,6 


380 OPEN «2,4,0,"C:QUEST.DAT" 


990 ? "OK, "jNM*;", PRESS (RETURN) TO" 


530 DATA 2,0,54,0,51,5,1,8 


882 FOR X=l TO 58!lNPUT *2iXl!Ml(X)=Xl 


:? "ENTER THE DUNGEON!" 


540 DATA 1,53,0,0,55,0,0,1 


!lNPUT l2)Xl!M2()()=Xl!lNPUT lt2iXl:Tl(X 


991 EL=0 


550 DATA 2,0,0,54,56,2,3,2 


)=X1 


992 IF EP)100 THEN EP=EP-100!EL=EL+100 


560 DATA 1,0,0,55,57,6,1,8 


884 NEXT X:CLOSE «2 


!FOR X=l TO 53:M2iX)=M2!X)tl.l!NEXT X: 


570 DATA 1,0,0,56,58,7,3,11 


900 ■? CHR*(125);"G0LD: ";GP 


SOTO 992 


580 DATA 2,0,0,57,0,8,4,9 


901 ? :? "You're at a market. Prices h 


993 EP=EP+£L 


590 RESTORE iSOTO 603 


ere are;":? 


994 IF EL>500 THEN FOR U=EL TO 500 STE 


600 DIM f1N$(89),l1$(8),,1S(8),Rl(53),R2( 


903 ? "[1] MAGIC ARROW 2 


P -100!F0R X=l TO 58:M2(X)=M2(Xi/l,l!N 


53, 41, 111(58), M2(58),T1(58),T$(277),EP( 


GOLD [2] FOUR NORMAL ARROWS 1 


EXT X:N£XT U 


12),SP(12i,TSi9),YYt(l) 


GOLD" 


995 INPUT fl$!? CHR$(125):PaKE 752,1 


602 DIM )($(23),NM$(20),A«(5),K$(49),)(1 


905 ? "[3] HEALING POTION 15 


996 A3=0!A4=0 


$(2),I$(2)!RETURN 


GOLD C4] HOLY WATER 3 


997 IF A2>ST»2 THEN A4=A2-ST»2:A2=ST»2 


603 FOR M TO 12:READ U,U,nimm 


GOLD" 


:? "MORE THAN ";ST>2i" MAGIC ARROWS WO 


23)-22)=)($!EP(X)=n:SP()()=)(2!NEn hl% 


910 ? !? "OK, ";NM«!", what do you nee 


ULD";'' "WEIGH YOU DOWN":' 


(277)="t" 


d ";!lNPUT A$;IT=VAL(A$) 


993 IF Al)STt2 THEN A3=Al-ST«2:Al=STt2 


605 FOR X=l TO 3:READ )i»,n$,)(2!MN$( (X 


911 IF IT>4 OR IT<0 THEN ? CHR$(253);" 


:? "MORE THAN "iST«2j" ARROWS WOULD":? 


«ll)-10)=X$:n$(X)=Xl$;MS()()=X2:NEXT h 


I DON'T SELL THATI":GOTO 910 


"WEIGHT YOU DOWN":? 


MN*(89) = "r' 


912 IF IT=0 THEN 990 


999 FOR X=l TO 500:NEXT X 


610 FOR M TO 58:READ Xl!Rl(X)=n!FOR 


913 IF IT=1 THEN Pl=2 


1000 POKE 752,11"' CHR»(125)iIF B1=0 TH 


Y=I TO 4!READ )(l!R2a,Y)=Xl!NEn Y 


914 IF IT=2 THEN Pl=l 


EN B1=1:G0T0 1005 


615 READ Xl:Ml(X)=Xl!READ Xl!H2(X)=Xl! 


915 IF IT=3 THEN Pl=15 


1001 IF RMOl THEN 1005 


READ Xl!Tl(X)=XltNEXT X 


916 IF IT=4 THEN Pl=3 


1002 PRINT "Do you wish to leave the d 


620 RM=l!Al=1000!AZ=1000!W=l!P2=2!P0KE 


917 ? !? "At "iPl;" GOLD apiece,":? "h 


ungeon ";: INPUT A$ 


752,0 


DW many will you buy ";: INPUT At!NM=VA 


1003 IF A$(1,1)="Y" THEN 800 


800 IF Bl=l THEN SOSUB 20000 


L(A»):PRINT 


1004 ? CHR*(125) 


805 IF Bl=l THEN Bl^OiBOTO 900 


918 IF NM<0 THEN PRINT CHR$(253) ; "VERY 


1005 ON RKRM) GOSUB 10000,11000 


810 POSITION 2,12-.? "Want to use an ol 


FUNNY! !"!PRINT "I DON'T BUY THINGS, I 


1010 IF TKRMDO THEN TX=INT(RNB(0)t9) 


d character ";: INPUT A$!? sIF A$(l,l)( 


SELL TH£M'l"!GOTO 916 


+16iTY=INT(RND(0)»6)+9:P0SITI0N TX.TYi 


>"Y" THEN 60SUB 21000iG0T0 900 


920 P1=P1INM 


PRINT "«"; 


812 ? "NAME! "i! INPUT NM$ 


921 0P=P1 


1015 X5=20:Y5=11 


815 ? "STRENGTH! ";: INPUT STilF ST>20 


925 ? !? "That comes to "jPl;" GOLD, " 


1020 IF I»="W" THEN Y5=22 


OR ST<3 THEN 815 


;NM» 


1022 IF I$="X" THEN Y5=2 


820 ' "DEXTERITY: ";: INPUT DXilF DX>20 


930 ? "How much will you give uie "pIN 


1024 IF I»="D" THEN X5=2 


OR DX<3 THEN 820 


PUT A:? 


1026 IF I»="A" THEN X5=38 


825 ? "WOUNDS: ";: INPUT W!W=W/100!lF W 


935 IF A<0P/10 THEN ? "FORGET IT'll"iG 


1028 POSITION H5,Y5i? YY$i 


<0.1 OR W>1 THEN 825 


OTO 901 


1030 IF M2(RM)>=1 THEN WX=INT!RND(0)t9 



32 



SoftSide August 1981 



)+16:WY=INT(RN0(0)»6)+9 


1201 IF pi.S<=C THEN FOR X=l TO LEN(Kt): 


11010 POSITION 11,18:? "J,!(S!S<S(";:POSITI 


1031 I1S=I1S(!11(RM))/10 


POSITION WX,WY:? K$(X,X);!NEXT X:I12(RM 


ON 25,18:'' "h^^m"] 


1050 IF H2(fiM)>=I THEN POSITION WX,WY! 


)=l12(Rr!)-l:EP=EP+l1SiMl(RH))!GOT0 1030 


11012 FOR X=5 TO 7:P0SITI0N 11, Xi? "I. 


PRINT M»((11(RN),M1(R!1)); 


1205 l1X=SSNtX5-WX) 


«(";:NEXT X 


1055 POSITION 2,1:? "ARROWS:";ftli" ";: 


1206 IF WX<X5 THEN I1X=1 


11014 FOR X=15 TO 17:P0SITI0N 11,X:':~ " 


POSITION 2,0!? "M ARROWS: "!A2;" "; 


1207 IF WX=X5 THEN MX=0 


& V'i:NEXT X 


1060 POSITION 2,21:? »ST="iST;" DX="!D 


1210 MY=SGN(Y5-WY) 


11015 X1=R2(RH,1) 


XpPOSITION 2,2:? "WOUNDS:"; INT(W<100+ 


1215 POSITION MX.WV:? " "j 


11020 IF XnO THEN FOR X=0 TO 4iP0SITI 


0,5)i" "; 


1220 LOCATE WX+MX,WY,A!POSITION WX+MX, 


ON 15,X:PRINT "8("i!P0SITI0N 25,X!PRINT 


1061 POSITION 2,3;^ "R00I1:"!RM;" "; 


WY:'' CHR*(A);:!F A=32 THEN WX=WX+t1X 


"t."i:NEXT X 


1062 POSITION 31,17:? "POTIONS; ";!POSI 


1225 LOCATE WX,I1Y+WY,A:P0SITI0N WX,I1Y+ 


11022 IF X1<=0 THEN POSITION 15,4:? "h 


TION 33,18:^ PT|» "-, 


WY:-? CHR$(A);:IF A=32 THEN WY=WY+I1Y 


l^WiVMW] 


1063 POSITION 31,19:? "H WATER: ";:POSI 


1230 IF ABSIWX-X5);l OR ABS(WY-Y5)M T 


11025 Xl=R2(Rfl,2) 


TION 33,20:? HW;" "; 


HEN 1050 


11030 IF X1>0 THEN FOR X=18 TO 22!P0SI 


1065 IF M2(R!1)>=1 THEN POSITION 27,0:? 


1235 X=RND(0):IF X:>!1S THEN 1050 


TION 15,X:PRINT "&"i:P0SITI0N 25,X!PRI 


"MONSTER: "jiPOSITION 27,1:? MNtdllKR 


1240 X=RND(0)«MS 


NT "i";!NEXT X 


«)«11)-10,I11(RM)»11) 


1245 W=W-X!lF W<0 THEN 5000 


11032 IF X1<=0 THEN POSITION 15,13:? " 


1070 IF M2(RM)<1 THEN POSITION 27,0:? 


1250 SOTO 1050 


h^\ih^lkkkW] 


"^POSITION 27,1:? " 


5000 FOR X=l TO LEN(K$)!P0S1TI0N X5,Y5 


11035 X1=R2(RH,3) 


II , 


:? K<(X,X);!NEXT XiFOR X=l TO 400:NEXT 


11040 IF XDO THEN POSITION 29,7!PRINT 


1075 IF t12iRI1)>l THEN POSITION 27,2:? 


X:? CHR$(125) 


"SiWIfiMM";: POSITION 29,15:PRINT "& 


"NUI1BER!";INT(!12(RM));" "i 


5005 ? "WELCOME TO HEAVEN, ")NM$;"'II" 


mMMV', 


1077 IF H2(RM)<=1 THEN POSITION 27,2:? 


5010 ? "I HOPE YOU ENJOYED YOUR SHORT 


11042 IF X1<=0 THEN FOR X=7 TO 15:PQSI 


U II 1 

) 


LIFTIME IN WHICH YOU ACCUHULATED ";GP; 


TION 29, X:? "St";:NEXT X 


1080 POSITION 2,17:? "EX;";INT(EP)i" " 


" GOLD" 


11045 X1=R2(RI1,4) 


;:POSITI0N 37,3:? "W";:POSITION 36,4:? 


5015 ^ "AND ";EP;" EXPERIENCE POINTS." 


11050 IF XDO THEN POSITION 2,7:PRINT 


"fl D"i:PCSITION 37,5:? "X"; 


5020 ? :■' :' "WOULD YOU LIKE TO BE REI 


"J(!(S(WI(!(Wi";:POSITION 2,15!PRINT "m 


1085 POSITION 2,18:'' "SP:";3P;" "; 


NCARNATED AS A NEW CHARACTER ";: INPUT 


WMW\ 


1086 IF N2<RI1)<>0 OR (INT(RND(0)>100) + 


A$:IF A$(1,1)="N" THEN GRAPHICS 0!END 


11052 IF X1<=0 THEN FOR X=7 TO 15:P0SI 


DOl THEN 1090 




TION 11. X:? "I(";:NEXT X 


1087 FOR X=l TO 7:P0SITI0N 4,23:? "WAN 


5025 RUN 


11055 RETURN 


DERINB MDNSTERI"|:FOR Y=l TO 40:NEXT Y 


10000 X1=R2(RH,1) 


15100 IF Y5=l THEN 15105 


:POSITION 4,23 


10010 IF X1>0 THEN FOR X=0 TO 7:P0SITI 


15102 LOCATE X5,Y5-l,M:PGSITiaN X5,Y5- 


1088 ? " "):FOR Y=l T 


ON 15,X:PRINT "ri:P0SITION 25,X!PRINT 


1:? CHR$(fl):IF M032 THEN RETURN 


15:NEXT Y!NEXT X!«2(RM)=INT(RND(0)»3 


"i"i!NEXT X 


15105 POSITION X5,Y5:? " "i 


)+l!l11(RM)=INT(RND(0)*8)+l!G0T0 1030 


10012 IF X1<=0 THEN POSITION 15,7:? "«< 


15110 Y5=Y5-1;1F Y5<1 THEN RM=R2(Rt1,l) 


1090 ft$="":FQR X=l TO DXtlO-EP!lF PEEK 


mmmvi 


:GOTO 1000 


(764)=255 THEN NEXT X:80T0 1093 


10015 X1=R2(RH,2) 


15120 POSITION X5,Y5!? YY$j!RETURN 


1091 GET t3,A:P0KE 764,255:A»=CHR»(A) 


10020 IF X1>0 THEN FOR X=15 TO 22!P0SI 


15200 IF Y5=21 THEN 15205 


1093 IF T1(RM)>0 THEN POSITION TX,TY:P 


TION 15,X:PRINT "&")!P0SITI0N 25,X:PRI 


15202 LOCATE X5,Y5+1,M!P0SITIQN X5,Y5+ 


RINT "1"; 


NT "V'|:NEXT X 


1:? CHR$(M)!lF M032 THEN RETURN 


1095 IF A$="" THEN A$=I$:GOTO 1100 


10022 IF X1<=0 THEN POSITION 15,15:? " 


15205 POSITION X5,Y5!? " "; 


1097 I»=A« 


Ui^&&W&&J("j 


15210 Y5=Y5+1:IF Y5>21 THEN RM=R2(Rn,2 


1100 IF I$="W" THEN GOSUB 15100 


10025 X1=R2(RM,3) 


):60TO 1000 


1105 IF I»="X" THEN GOSUB 15200 


10030 IF XI >0 THEN FOR X=25 TO 38!P0SI 


15220 GOTO 15120 


1110 IF I$="D" THEN GOSUB 15300 


TION X,7!PRINT "V';:P05ITI0N X,15!PRIN 


15300 IF X5>37 THEN 15305 


1115 IF I$="A" THEN GOSUB 15400 


T "?("|:NEXT X 


15302 LOCATE X5+1,Y5,M:P0SITI0N X5+1,Y 


1120 IF I*="H" THEN I$="»:IF PT>0 THEN 


10032 IF X1<=0 THEN FOR X=7 TO 15:P0SI 


5!? CHR»(M)!lF H032 THEN RETURN 


PT=PT-l!W=l 


TION 25, X:? "V'pNEXT X 


15303 LOCATE X5+2,Y5,M!P0SITI0N X5+2,Y 


1125 IF I$="I1" AND A2>0 THEN I»=""iA2= 


10035 X1=R2(RM,4) 


5:? CHR»(M):IF M032 THEN RETURN 


A2-1:G0SUB 15500 


10040 IF X1>0 THEN FOR X=2 TO 15!P0SIT 


15305 POSITION X5,Y5:? " "; 


1130 IF I$="N" AND ADO THEN I$="":A1= 


ION X,7!PRINT "«.";!P0SITION X,15:PRINT 


15310 X5=X5+2:IF X5>37 THEN RM=R2(RH,3 


A1-1:S0SUB 15600 


"8("i:NEXT X 


)!GOTO 1000 


1135 IF I»="F" THEN GOSUB 16000 


10042 IF X1<=0 THEN FOR X=7 TO 15:P0SI 


15320 GOTO 15120 


1140 IF I$="0" THEN GOSUB 17000 


TION 15, X:? "V'r.NEXT X 


15400 IF X5<3 THEN 15405 


1145 IF I$="T" AND HW>0 THEN I$="":HW= 


10045 RETURN 


15402 LOCATE X5-1,Y5,M!P0SITI0N X5-1,Y 


Htt-l:5QSUB 18000 


11000 POSITION 11,4:? "!,8i!<!i!<")!P0SITI0 


5:? CHR«(M):IF M032 THEN RETURN 


1200 IF M2(R(1)<1 THEN 1030 


N 25,4!? "{(!(&!(l("i 


continued on next page 



SoftSide August 1981 



33 



continued from previous page 


15760 RETURN 


20024 OPEN #2,8,0, "C:Sl)EST.m" 


15403 LOCATE X5-2,Y5,M:P0SITIQN X5-2,Y 


16000 IF ftBS(X5-WX)>l OR ASS(Y5-WV)>1 


20025 FOR X=l TO 58:PRINT I2;M1(X);PRI 


5;'' CHRJ(M1:IF M032 THEN RETURN 


THEN RETURN 


NT «2iri2(X):PRINT «2;TliX) 


15405 POSITION X5,Y5!'' " "i 


16001 IF !11(RM)=e THEN RETURN 


20027 NEXT X:CL0SE #2:? "SAVE COMPLETE 


15410 X5=X5-2!lF X5<3 THEN R«=R2(RH,4) 


16002 IF m(RI1)=7 THEN RETURN 


II 

1 


;GOTO 1000 


16003 IF M1(RM)=6 THEN «=W-0,05 


20028 ^ "Would yOu like to stop now "; 


15420 GOTO 15120 


16005 X=RND(0)!lF RC=0 THEN X=X-0.1 


iliMFUT fi$:IF A$!1,1)<>"V" THEN RETURN 


15500 GOSUB 15699 


16006 X=X-(DX/100) 


20030 ? "QK. So that you can use this 


15505 X=RNDiO)/2:IF RC=1 THEN X=X-O.I 


16007 IF RC=2 THEN X=X-0.3 


characteragain at a later time:" 


15506 IF RC=2 THEN X=X+0.1 


16008 X=X-(EP/1000) 


20035 ■^ "NAME: "iNM$;" RACE: ";:IF RC= 


15507 X=X-(EP/1000) 


16010 IF X>W THEN RETURN 


THEN ? "HUMAN" 


15510 X=X-0.2 


16015 X=RND(0):IF RC=0 THEN X=Xt0.1 


20036 IF RC=1 THEN ^ "ELF" 


15511 X=X-(DX/100) 


16016 X=X+(ST/100) 


20037 IF RC=2 THEN ? "DWARF" 


15515 IF X>W THEN RETURN 


16017 IF RC=2 THEN X=X+0.2 


20045 ? "HEALING POTIONS: ";PT 


!5520 X=RND(0);IF RC=1 THEN X=X+0.2 


16020 l1S=l1S-XiRETURN 


20046 ^ "HOLY WATER: "jHW 


15522 IF RCOl THEN X=X+0.1 


17000 IF fiBS(TX-X5)>l THEN RETURN 


20050 ? "ARROWS: ";Ali" MAGIC ARROWS 


15523 IF RC=2 THEN X=X+0.1 


17005 IF ABS(TY-Y5)>1 THEN RETURN 


: "!A2 


15525 MS=MS-X:RETURN 


17010 POSITION TXJY:? " "; 


20055 ? "GOLD: "iGP;" EXPERIENCE: "; 


15599 RETURN 


17011 TX=0:TY=0 


EP 


15600 GOSUB 15699 


17015 POSITION 12,23:'' T«((Tl(R!1))f23)- 


20060 7 "STRENGTH: ")ST;" DEXTERITY: 


15601 IF I11(RI1)=8 THEN RETURN 


22,T1(RM)I23)):F0R X=l TO 120:NEXT X 


"jDX 


15605 X=RNt)(0)/2!lF RC=1 THEN X=X-0.1 


17020 FOR X=12 TO 34:PQSITI0N X,23:? " 


20065 "^ ;? "Would you like to try agai 


15606 X=X-(DX/!00) 


"pNEXT X 


n":? "as a tNEW» character "j;INPUT A» 


15607 IF RC=2 THEN X=X+0.1 


17021 IF T1(RM)=10 THEN PT=PT+1:G0T0 1 


:IF At(l,li="Y" THEN CLR :G0T0 7 


1560S X=X-(EP/1000) 


7026 


20099 GRAPHICS 0:? "COME QUESTING A6AI 


15610 IF X>W THEN RETURN 


17022 IF T1(RI1)=11 THEN ft2=fi2+10:60TO 


N SOMETIME! '":END 


15620 X=RND(0)!lF RC=1 THEN X=X+0.1 


17026 


21000 ? "OK, I'll make you one.":FOR X 


15621 IF RC=2 THEN X=X-0.1 


17023 IF T1(RM)=12 THEN A1=A1+10:G0T0 


=1 TO 100:NEXT X:GP=INT(RND(0)«20)+6:S 


15625 riS=l1S-X! RETURN 


17026 


T=INT(RND(0)«17)+4:DX=INT(RND(0)»17)+4 


15698 RETURN 


17024 TS(T1(RM))=TS(T1(RI1))+1 


21005 RC=INT(RND(0)«3):A1=3:A2=INT(RND 


15699 IF WX=0 THEN WX=31:IF WY=0 THEN 


17025 6P=GP+GP(Tl(Rt1)) 


(0)«10)+1:PT=INT(RND(0)»3)+2!HW=INT(RN 


WY=8 


17026 EP=EP+EP(Tl<RM)):Tl(Rri)=0 


D(0)»5)+1:EP=0:W=1 


15700 X6=X5!Y6=Y5-l!X7=WX:Y7=WY 


17030 RETURN 


21010 ? "STRENGTH; ";ST;" DEXTERITY: 


15701 IF X6=X7 THEN SL=0!X8=X7!X9=X6 


18000 M=M1(RI1):IF H=2 OR H=5 OR (1=7 TH 


"jDX 


15702 IF X60X7 THEN SL=(Y6-Y7)/(X6-X7 


EN RETURN 


21015 ? "GOLD: "iGP;" HEALING POTION 


)!X8=X6!X9=X7 


18005 GOSUB 15699:POSITI0N WX,WY:? " " 


S: ";PT 


15703 GOTO 15708 


i:WA=WX:WB=WY:WX=X5:WY=Y5:G0SUB 16000: 


21020 ? "HOLY WATER: ";HW!" RACE: "; 


15705 IF X6>X7 THEN SL=(Y6-Y7)/(X6-X7) 


WX=WA!WY=WB:POSITIQN X5,Y5;? YYIpRETU 


;IF RC=0 THEN ? "HUMAN" 


!X8=X6!X9=X7 


RN 


21021 IF RC=1 THEN ? "ELF" 


15706 IF X7>X6 THEN SL=(Y7-Y6)/(X7-X6) 


20000 PRINT "WOULD YOU LIKE TO SEE THE 


21022 IF RC=2 THEN ? "DWARF" 


:XB=X7;X9=X6 


TREASURES YOU RETRIEVED FROM THE DU 


21025 ? "ARROWS: "jAl;" MAGIC ARROWS 


15707 IF X7=X6 THEN SL=0!X8=X7!X9=X6 


NGEON";: INPUT A$ 


: ";A2 


15708 Y8=y6!Y9=Y7 


20005 IF A$(1,1)="Y" THEN FOR X=l TO 9 


21030 7 ;? "What will you name this ch 


15709 Y=Y8 


:? STR$(X)|". ";T*((Xt23)-22,Xt23)iCHR 


aracter": INPUT NM$!? :? "HAVE A FUN QU 


15710 SL=SL<SGN(Y8-Y9):IF Y6<Y7 THEN S 


$(127)iTS(X):NEXT X 


EST, "|NH»|"!"'" 


L=-SL 


20010 FOR X=l TO 9:TS(X)=0:NEXT X 


21040 FOR X=l TO 200;NEXT X:? CHR»(125 


15711 IF X6>X7 THEN SL=-SL 


20011 A1=A1+A3;A2=A2+A4 


1: RETURN 


15712 FOR X=X8 TO X9 STEP S6N(X9-X8+0. 


20015 ? :? "WOULD YOU LIKE TO SAVE THI 


30000 POKE 106,PEEK(106)-5:GRAPHICS 0: 


ODiFOR XX=1 TO 5:NEXT XX 


S GAME ";: INPUT A$ 


? "INITIALIZING , . .";SETCOLQR 2,7,0 


15713 IF Y>22 OR Y<1 OR X>37 OR X<3 TH 


20017 IF A»(1,1)<>"Y" THEN 20028 


30010 START=(PEEK(106)+l)t256 


EN NEXT XiGOTO 15750 


20018 ? "CASSETTE OR DISK ";: INPUT A«: 


30020 FOR X=0 TO 1023:P0KE START+X.PEE 


15715 LOCATE X,Y,A:IF ft=38 THEN X9=X-1 


IF A$(1,1)="C" THEN ? "HIT (RETURN) WH 


K(57344+X):NEXT X: RESTORE 30050 


iGOTO 15750 


EN READY ":60T0 20024 


30030 POKE 756, START/256 


15720 POSITION X.YiPRINT "+";:Y=Y+SL!N 


20019 IF A«(1,1)<>"D" THEN 20018 


30040 FOR X=0 TO 7: POKE X+START+48,85: 


EH X 


20020 OPEN 12,8,0, "D:QUEST. DAT" 


NEXT X:FOR X=0 TO 7!READ X1;P0KE X+STft 


15750 Y=Y8:F0R X=X8 TO X9 STEP S6N(X9- 


20021 FOR X=l TO 58:PRINT *2;M1<X):PRI 


RT+256,X1:NEXT X:RETURN 


X8+0.01)iP0SITI0N X.YiPRINT " "i!Y=Y+S 


NT #2;M2(X):PRINT l2iTl(X) 


30050 DATA 152,216,255,27,25,60,102,23 


LjNEXT X 


20022 GOTO 20027 


1 

continued on page 36 



34 



SoftSide August 1981 



1/fli ^ - '- ;:« - ^ ■'■■ '■ 



■^ * 











^1 



- •- .y-. 







ii:'^> 






continued from page 34 












APPLE VERSION 


140 
145 


DATA 
DATA 


1,8,5,9,7,0,0,0 
1,0,0,6,0,0,0,1 




58),Tt(12),EP(12),BP(m,TSl 
12) 


Print title page. 


150 


DATA 


2,0,6,0,11,2,11,2 


601 


BELLt = CHRt (7) 




155 


DATA 


2,0,0,10,6,2,3,1 


603 


FOR X = 1 TO 12: READ TtlX), 




160 


DATA 


2,0,0,0,9,5,1,4 




EP(Xi,GP(X): NEXT X 


D« = CHR$ (4): PRINT 


165 


DATA 


1,0,0,8,12,0,0,1 


605 


FOR X = 1 TO 8: READ MNt(X), 


1 PRINT D»i"NO HON C,I,0" 


170 


DATA 


2,0,1,11,13,2,5,3 




Mt{X),MS(X)! NEXT X 


2 HOME : VTAB 6: HTAB 14! FLASH 


175 


DATA 


1,0,0,12,14,0,0,1 


610 


FOR X = 1 TO 58: READ RKX): 


! PRINT "QUEST 1": NORflAL 


180 


DATA 


2,15,26,13,17,5,1,1 




FOR Y = 1 TO 4: READ R2(X,Y 




185 


DATA 


2,0,14,0,0,0,0,1 




)! NEXT Y 


3 At = " t t t 


190 


DATA 


2,0,17,0,0,1,2,5 


615 


READ M1(X),M2(X),T1(X)! NEXT 


t t t t t t t QUEST 


195 


DATA 


1,16,20,14,0,4,1,1 




X 


1 WAS WRITTEN 


200 


DATA 


2,0,19,1,26,2,2,7 


620 RM = 1 


BY BRIAN R E Y N 


205 


DATA 


2,18,30,3,27,3,2,2 






L D S " APPLE TRANSLATION B 


210 


DATA 


1,17,21,0,0,0,0,1 






Y RICH BOUCHARD t t t t t t 


215 


DATA 


1,20,22,0,0,6,2,9 


Use 


an old character? 


t t t t (HAVE FUND " 


220 


DATA 


1,21,23,0,0,2,3,12 






4 FOR X = 1 TO LEN (Atl - 13: VTAB 


225 


DATA 


1,22,24,0,0,4,2,10 






9! HTAB 14! PRINT MID* (At, 


240 


DATA 


1,23,25,34,0,0,0,11 






X,13)ii FOR Y = 1 TO 75: NEKT 


250 


DATA 


2,24,0,0,0,7,3,9 


800 


IF Bl M THEN GOSUB 20000 


Y! NEXT X 


260 


DATA 


2,14,0,18,0,3,2,1 


805 


IF Bl = 1 THEN Bl = 0: GOTO 


7 DEF FN A(X) = INT ( RND (1) t 


270 


DATA 


2,0,28,19,0,4,1,2 




900 


X + 1) 


280 


DATA 


1,27,29,31,0,0,0,1 


810 


HTAB 1: VTAB 13: INPUT "DO Y 


8 YYt = "3"!Kt = "'it7.i't(!)/<+>l 


290 


DATA 


2,28,0,0,0,5,1,10 




OU WANT TO USE AN OLD CHARAC 


»!Kt = Kt + Kt + Kt + '1111+ 


300 


DATA 


2,19,0,0,0,1,2,3 




TER''"iAt! IF LEFT* (At,l) < 


t++ " 


310 


DATA 


1,0,32,0,28,0,0,4 




> "Y" THEN SOSUB 21000: GOTO 




320 


DATA 


1,31,33,43,0,0,0,1 




900 




330 


DATA 


2,32,35,0,0,5,1,8 


812 


PRINT ! INPUT "NAME: "|NMt 


Data for monsters and treasures. 


340 


DATA 


1,0,0,35,24,0,0,12 


815 


INPUT "STRENGTH: ")A$!ST = VAL 




350 


DATA 


1,33,36,45,34,0,0,5 




(At)i IF ST > 20 OR ST ( 3 THEN 




360 


DATA 


1,35,0,37,0,7,1,10 




815 


100 DATA WORTHLESS ODDS I ENDS 


370 


DATA 


2,0,0,0,36,8,3,9 


820 


INPUT "DEXTERITY: ";A$:DX = 


,0,0, A BAG FULL OF COPPER CO 


380 


DATA 


1,5,49,0,39,0,0,1 




VAL (At): IF DX > 20 OR DX ( 


INS, 1,3, A SMALL BRASS STATUE 


390 


DATA 


1,0,40,38,0,0,0,6 




3 THEN 820 


TTE,2,5,A BAG FULL OF VARIOU 


400 


DATA 


1,39,0,0,41,2,3,2 


825 


INPUT "WOUNDS! ";At!W = VAL 


S COINS, 3, 7, A PURSE FULL OF 


410 


DATA 


1,42,46,40,43,4,1,7 




(At) / 100: IF « < .1 OR W > 


GOLD COINS, 5, 12,3 SOLD NU6GE 


420 


DATA 


2,0,41,0,0,7,3,8 




1 THEN 825 


TS ,8,17,4 SHALL TURQUOI 


430 


DATA 


2,0,44,41,32,6,1,11 


830 


INPUT "EXPERIENCE: "iA$;EP = 


SES,7,15,A LARGE RUBY ,1 


440 


DATA 


1,43,45,0,0,0,0,5 




VAL (At) 


5,30 


450 


DATA 


1,44,0,47,35,0,0,1 


832 


INPUT "GOLD: "iAt:GP = VAL 


105 DATA A tHUGEt SAPPHIRE, 150, 


460 


DATA 


2,41,47,48,0,5,1,7 




(At) 


150, A HEALING POTION,10,0,A 


470 


DATA 


1,46,0,50,45,0,0,3 


835 


INPUT "IS (S)HE AN ELF? ";At 


QUIVER OF 10 MAGIC ARROWS, 15 


480 


DATA 


1,0,0,49,46,0,0,1 




! IF LEFTt (At,l) = "Y" THEN 


,0,A QUIVER OF 10 NORMAL ARR 


490 


DATA 


2,38,51,52,48,6,1,6 




RC = 1 


0WS,10,0 


500 


DATA 


1,0,0,51,47,2,5,10 


836 


IF RC = THEN INPUT "IS (S 


110 DATA SKELETON, S,2,0RC,0,3,Z 


510 


DATA 


1,49,0,53,50,4,3,5 




)HE A DWARF? "jAt: IF LEFTt 


0MBIE,Z,4,6H0UL,G,6,HUGE SPI 


520 


DATA 


2,0,0,0,49,6,1,6 




(At,l) = "N" THEN RC = 2 


DER,H,7,MUMMY,M,8,GIANT,6,9, 


530 


DATA 


2,0,54,0,51,5,1,8 


840 


INPUT "MAGIC ARROWS: ";At:A2 


WRAITH, W, 9. 9 


540 


DATA 


1,53,0,0,55,0,0,1 




= VAL (A$): INPUT "NORMAL 




550 


DATA 


2,0,0,54,56,2,3,2 




ARROWS: "jAtiAl = VAL (At) 


Data for the rooss. 


560 


DATA 


1,0,0,55,57,6,1,8 


845 


INPUT "HEALING POTIONS: ")At 




570 


DATA 


1,0,0,56,58,7,3,11 




:PT = VAL (At) 




580 


DATA 


2,0,0,57,0,8,4,9 


846 


INPUT "HOLY WATER: "iAt:HW = 


115 DATA 1,12,3,2,18,0,0,0 










VAL (At) 


120 DATA 2,0,0,0,1,4,2,8 


Ini 


tialize variables. 






125 DATA 1,1,0,4,19,0,0,1 












130 DATA 1,0,0,5,3,3,1,1 


600 


DIM HN$(8),M$(8),MS(8),R1(58 






135 DATA 2,6,38,0,4,1,3,6 




),R2(58,4),M1(58),M2(58),T1( 


Loac 


in an old game? 



36 



SoftSide August 1981 



850 PRINT : INPUT "DO YOU WANT T 


925 PRINT "THE PRICE NOW COMES T 


999 IF Al ) ST t 2 THEN A3 = Al - 


LOAD IN m OLD SAME? ";A$: 


»;P1;" GOLD." 


ST t 2!AI = ST » 2: PRINT "M 


IF LEFT$ (A$,l) < > "Y" THEN 


930 PRINT "HOW MUCH WILL YOU BIV 


ORE THAN ";3T 1 2;" ARROWS W 


900 


E ME, ";NMt;: INPUT "? ";A»! 


OULD", "WEIGH YOU DOWN.": FOR 


852 INPUT "DISK OR CASSETTE ?";A 


A = VAL (A») 


X = 1 TO 2000: NEXT X 


$ 


935 IF A < QP / 10 THEN PRINT " 




855 IF LEFT$ (A$,l) = "C" THEN 


FORGET IT!!!"! GOTO 901 




INPUT "HIT (RETURN) TO BEG! 


940 IF A < OP / 2 THEN PRINT "N 


Upon entering a new room, draw it 


N READ "lAt: PRINT : PRINT " 


OT INTERESTED."; GOTO 901 


with its monsters and treasures. 


(WAIT FOR SIX BEEPS.)"! RECALL 


941 IF A > = PI THEN PRINT "YO 


If this is roosi one, give option to 


Ml! RECALL M2! RECALL Tl: GOTO 


U GOT A DEAL!!!": GOTO 950 


leave. 


890 


942 Y = A / PhX = RND (1): IF X 




857 INPUT "ENTER FILESPEC )";A» 


> Y THEN PRINT "NOT INTERE 




860 PRINT D$i"OPEN "jAt 


STED":P1 = INT ((OP + PI) / 


1000 HOME : IF Bl = THEN Bl = 


865 PRINT D$i"READ "jAS 


2)! GOTO 930 


1: GOTO 1005 


870 FOR X = 1 TO 58: INPUT HliX) 


945 PI = INT ((PI 1 2 + A) / 3): 


1001 IF RH ( > 1 THEN 1005 


: INPUT M2(X)! INPUT TKX): NEXT 


IF (PI > = A) THEN 941 


1002 INPUT "DO YOU WANT TO LEAVE 


X 


947 PRINT "HOW ABOUT ";P1;", ";N 


THE DUNGEON? ";A» 


875 PRINT D«| "CLOSE ";A$ 


M»;"?"! GOTO 930 


1003 IF LEFT* (A*,l) = "Y" THEN 


890 PRINT "LOAD COMPLETE." 


950 IF 6P < PI THEN PRINT BELL* 


800 




i"WHAT!' CAN'T PAY YER DEBT 


1004 HOME 




S, ";NM*;"?", "YOU'LL BE THRO 


1005 ON RKRM) 60SUB 10000,11000 




WN IN PRISON FOR THIS!'!";BE 




Marketplace and bargaining routine. 


LL*! END 


1010 IF TKRM) > THEN TX = FN 




955 6P = 6P - Pi! PRINT "YOU NOW 


A(9) + 15;TY = FN A(6) + 9; 




HAVE "iGP;" BOLD, ";NM*;"." 


HTAB TX: VTAB TY: PRINT 't" 


900 HOME ! PRINT "GOLD: ";6P 


960 IF IT = 1 THEN A2 = A2 + NM 


1 


901 PRINT ! PRINT "YOU ARE AT TH 


965 IF IT = 2 THEN Al = Al + NM 1 


1015 X5 = 20!Y5 = 13 


E MARKET. PRICES HERE ARE:" 


4 


1020 IF I* = "W" THEN Y5 = 22 




970 IF IT = 3 THEN PT = PT + NM 


1022 IF I* = "X" THEN Y5 = 2 


903 PRINT " 1. MAGIC ARROW, . 


975 IF IT = 4 THEN HW = HW + NM 


1024 IF I* = "D" THEN X5 = 2 


2 BOLD" 


980 GOTO 901 


1026 IF I* = "A" THEN X5 = 39 


904 PRINT " 2. FOUR NORMAL ARR 




1028 HTAB X5: VTAB Y5: FLASH : PRINT 


OWS . . .1 GOLD" 




YY«;: NORMAL 


905 PRINT " 3. HEALING POTION 


Enter dungeon; check for too many 


1030 IF M2(RM) > = 1 THEN «X = 


.... 15 GOLD" 


arrows. 


FN A(IO) + 15:WY = FN A(6) 


906 PRINT " 4. HOLY WATER . , 




+ 9 


3 GOLD" 




1031 MS = MS(M1(RM)) / 10 


910 PRINT ! PRINT "OK, ";NM«;", 


990 PRINT "OK, "jNM*;", PRESS <R 


1050 IF M2(RM) > = 1 THEN HTAB 


WHAT ITEM WOULD": INPUT "YOU 


ETURN) TO 60", "INTO THE DUNG 


WX: VTAB WY: PRINT M*(M1(RM) 


LIKE? (ENTER NUMBER) "iA$: 


EON." 


)) 


IT = VAL (A*): IF IT > 4 OR 


991 EL = 




IT < THEN PRINT BELL*; "I 


992 IF EP > 100 THEN EP = EP - 1 




DON'T SELL THAT!": GOTO 910 


00:EL = EL + 100: FOR X = 1 TO 


Print player status, check for 


911 IF IT = THEN 990 


58!M2(X) = H2(X) » 1.1: NEXT 


wandering monsters. 


912 IF IT = 1 THEN PI = 2 


! GOTO 992 




913 IF IT = 2 THEN PI = 1 


993 EP = EP + EL 


1055 HTAB 1: VTAB 2: PRINT "ARRO 


914 IF IT = 3 THEN PI ' 15 


994 IF EL > 500 THEN FOR U = EL 


WS!";Ali" "i! HTAB U VTAB 1 


915 IF IT = 4 THEN PI = 3 


TO 500 STEP - 100! FOR X = 


! PRINT "M. ARROWS: "iA2i" "j 


916 PRINT "AT ";PIi" GOLD APIECE 


1 TO 58!M2(X) = H2(X) / l.l! 


1060 HTAB l! VTAB 22: PRINT "ST= 


, HOW MANY WILL"! INPUT "YOU 


NEXT ! NEXT 


";ST;" DX=";DX)! HTAB 1: VTAB 


BUY? "iA»:NM = VAL (A$) 


995 INPUT A»: HOME 


3: PRINT "WOUNDS:"; INT (W » 


917 IF NM < THEN PRINT BELL*; 


997 A3 = 0iA4 = 


100 + .5);"V';" "; 


"VERY FUNNY!!": PRINT "I DO 


998 IF A2 > ST t 2 THEN A4 = ft2 - 


1061 HTAB 1: VTAB 4: PRINT "ROOM 


NOT BUY THINGS, I SELL THEM' 


ST 1 2:A2 = ST t 2: PRINT "M 


. " . DM. It K ■ 

: ;RM; ; 


"! GOTO 916 


ORE THAN »;ST 1 2;" MAGIC AR 


1062 HTAB 33! VTAB 18: PRINT "PO 


920 PI = PI » NM 


ROWS WOULD", "WEIGH YOU DOWN. 


TIONSi";: HTAB 35: VTAB 19: PRINT 


921 OP = PI 


"! FOR X = 1 TO 2000! NEXT X 


DT.ll ". 

' ' continued on next page 



SoftSide August 1981 



37 



continued from previous page 






10i3 HTAB 33: VTftB 20: PRINT "HC 


1125 IF 1$ = "M" AND fi2 ; THEN 


5015 PRINT "AND ";£?;" EXFERIlWl 


LY H20"|! HTftB 35: VTAB 21: PRINT 


1$ = "":A2 = A2 - 1: GCSUB 1 


E POINTS." 


HW;" "i 


5500 


5020 PRINT : PRINT : INPUT "WCUL 


1065 IF !12(R11) > = 1 THEN HTAB 


1130 IF 1$ = "N" AND Al > THEN 


D YOU LIKE TO BE REINCARtiATE 


28: VTAB 1: PRINT "nCNSTER:" 


1$ = "":A1 = Ai - 1: SOSUB 1 


D A3 A NEW CHARACTER ?";A»: 


;: HTAS 30: VTAB 2: PRINT MN 


5600 


IF LEFT* (A$,l) = "N" THEN 


KHURM)); 


1135 IF 1$ = "F" THEN SOSUB 160 


STOP 


1070 IF N2(R«) < 1 THEN HTAB 28 


00 


5025 RUN 


: VTAB 1: PRINT " 


1140 IF II = "0" THEN SOSUB 170 




";: HTAB 30: VTAB 2: PRINT 


00 


Subroutine to draw a 


II It , 


1145 IF 1$ = "T" AND HW > THEN 


passage/intersection, 


1075 IF M2(RI1) ) 1 THEN HTAB 28 


1$ = "":HW = HW - 1: SOSUB 1 




: VTAB 3: PRINT "NUHflER:"; INT 


8000 


10000 REM DRAW HALLWAY (TYPE « 


(f12(R11))i" "1 




li 


1077 IF H2(RI1) < = 1 THEN HTftB 


If there is a monster in the room, 


10002 INVERSE 


20: VTAB 3: PRINT " 


move it and let it attack. 


10005 XI = R2(RM,l) 


1' 1 
1 




10010 IF XI > THEN FOR X = 1 TO 


1080 HTAB 1: VTAB 18: PRINT "EX: 


1200 IF t12(RM) < 1 THEN 1030 


3: HTAB 15: VTAB X: PRINT " 


"! INT (EP);" "): HTAB 35: VTAB 


1201 IF MS < =0 THEN FOR X = 


"i: HTAB 26: PRINT " ";: NEXT 


5: PRINT "W";: HTAB 34: VTAB 


1 TO LEN (K»): HTAB WX: VTAB 


X 


6: PRINT "A D",-: HTAB 35: VTAB 


WY: PRINT MID$ (Kt.X.l);: NEXT 


10012 IF XI ( =0 THEN HTAB 16 


7: PRINT "X"; 


X:M2(RM) = M2(RM) - 1:EP = E 


: VTAB 9: PRINT " 


1085 HTAB 1: VTAB 19: PRINT "6P: 


P + HSfMKRfl)): SOTO 1030 


J 




1205 MX = S6N (X5 - WX) 


10015 XI = R2(RM,2) 


108i IF M2(RM) = AND FN AdOO 


1206 IF WX < X5 THEN MX = 1 


10020 IF XI > THEN FOR X = 16 


) = 1 THEN FOR X = 1 TO 10: 


1207 IF WX = X5 THEN MX = 


TO 23: HTAB 15: VTAB X: PRINT 


HTAB 5: VTAB 24: PRINT "WAN 


1210 MY = SGN (Y5 - WY) 


" "j: HTAB 26: PRINT " ";: NEXT 


DERING MONSTERI";: FOR Y = 1 


1215 HTAB WX: VTAB WY: PRINT " " 


X 


TO 50: NEXT Y: HTAB 5: VTAB 


! 


10022 IF XI ( =0 THEN HTAB 16 


24; PRINT " 


1220 IF SCRN( WX + MX - 1,WY « 


: VTAB 16: PRINT " 


";: FOR Y = 1 TQ 50: NEXT Y 


2 - 2) + 16 1 SCRN( WX + MX 


It f 


,X:I12(RM) = FN A13):M1(RI1) = 


- 1,WY 1 2 - 1) = 160 THEN 


10025 XI = R2(RM,3) 


FN ft(8): SOTO 1030 


WX = WX + MX 


10030 IF XI > THEN FOR X = 26 




1225 IF SCRN( WX - 1,MY « 2 + W 


TO 40: HTAB X: VTAB 9: PRINT 


Accept a conmand from keyboard and 


Y « 2 - 2) M6 « SCRN( WX - 


" ";: HTAB X: VTAB 16: PRINT 


call appropriate subroutines. 


1,MY t 2 + WY t 2 - 1) = 160 


" ";: NEXT X 




THEN WY = WY + MY 


10032 IF XI ( =0 THEN FOR X = 


1090 A$ = "": FOR X = 1 TO DX 1 1 


1230 IF ABS (WX - X5) > 1 OR ABS 


9 TO 16: HTAB 26: VTAB X: PRINT 


- EP: IF PEEK ( - 16384) > 


(WY - Y5) > 1 THEN 1050 


" ";: NEXT X 


128 THEN X = 9999 


1235 X = RND (1): IF X > MS THEN 


10035 XI = R2(R(1,4) 


1091 NEXT X: IF X > 9000 THEN BET 


1050 


10040 IF XI > THEN FOR X = 1 TO 


At 


1240 X = RND (1) * MS 


15: HTAB X: VTAB 9: PRINT " 


1093 IF Tl(RM) > THEN HTAB TX 


1245 W = W - X: IF W < THEN 500 


"i: HTAB X: VTAB 16: PRINT " 


: VTAB TY; PRINT "J"; 





"j: NEXT X 


1095 IF A$ = "" THEN A» = I«: SOTO 


1250 GOTO 1050 


10042 IF XI < =0 THEN FOR X = 


1100 
1097 1$ = M 


End-routine for the 'Great Dungeon 


9 TO 16: HTAB 15: VTAB X: PRINT 
" ";: NEXT X 


1100 IF 1$ = "W" THEN SOSUB 151 


in the Sky' ending. 


10045 NORMAL : RETURN 


00 
1105 IF I» = "X" THEN 5QSUB 152 

00 
1110 IF 1$ = "D" THEN SOSUB 153 

00 
1115 IF I* = "A" THEN SOSUB 154 


5000 FOR X = 1 TO LEN (K$): HTAB 
X5: VTAB Y5: PRINT MID* (K$ 
jX,!);: NEXT X: FOR X = 1 TO 
1000: NEXT h HOME 


Subroutine to draw a cha«ber/rooa, 


5005 PRINT "WELCOME TO HEAVEN, " 
jNMt)"!!!" 

5010 PRINT "I HOPE YOU ENJOYED Y 

OUR SHORT LIFETIME IN WHICH 

YOU ACCUMULATED "jSPi" GOLD 

11 


11000 REM DRAW CHAMBER (TYPE«2) 


00 
1120 IF I» = "H" THEN 1$ = "": IF 
PT > THEN PT = PT - 1:W = 
1 


11002 INVERSE 

11005 HTAB 9: VTAB 5: PRINT " 
"j! HTAB 26: PRINT " 



38 



SoftSide August 1981 



11010 HTAB 9: VTAB 20: PRINT " 
"): HTAB 26! PRINT " 

11012 FOR X = i TO 9: HTAB 9: VTAB 

X: PRINT " ")! NORMAL ! PRINT 
II II , , 

t ■ 

INVERSE ! PRINT " "j: NEXT X 

11014 FOR X = 16 TO 19: HTAB 9: VTAB 
X! PRINT " "i! NORMAL : PRINT 

n II , , 

) ' 

INVERSE : PRINT " "j: NEXT X 

11015 XI = R2(R!1,1) 

11020 IF XI > THEN FOR X = 1 TO 
4! HTAB 15i VTAB X: PRINT " 
"i: HTAB 26: PRINT " ";: NEXT 
X 

11022 IF XI < =0 THEN HTAB 14 
! VTAB 5! PRINT " 

! 

11025 XI = R2(RH,21 
11030 IF XI > THEN FOR X = 21 
TO 23! HTAB 15! VTAB X: PRINT 

" ";: HTAB 26: PRINT " ";; NEXT 

X 
11032 IF XI < =0 THEN HTAB 16 

! VTAB 20! PRINT " 



11040 IF XI > THEN HTAB 32: VTAB 
9! PRINT " "i! HTAB 
32! VTAB 16! PRINT " 

« * 

11042 IF XI < =0 THEN FOR X = 

10 TO 15! HTAB 32! VTAB X! PRINT 

" "j! NEXT X 
11045 XI = R2(RI1,4) 
11050 IF XI > THEN HTAB 1: VTAB 

9! PRINT " ")! HTAB 

l! VTAB 16: PRINT " 

11052 IF XI < =0 THEN FOR X = 
10 TO 15i HTAB 9: VTAB Xi PRINT 
" 'i! NEXT X 

11055 NORMAL ! RETURN 

Subroutines for soving player 
around screen. 



15100 IF Y5 = 1 THEN 15105 
15102 H = SCRN( X5 - 1,Y5 I 2 - 
4) + 16 t SCRN( X5 - 1,Y5 » 
2 - 3) - 128: IF M < > 32 THEN 
RETURN 
15105 HTAB X5! VTAB Y5i PRINT " 

15110 Y5 = Y5 - li IF Y5 < 2 THEN 
RM - R2(R(1,1)! BOTO 1000 



15120 HTAB X5i VTAB Y5: FLASH : PRINT 

YY$;! NORMAL : RETURN 
15200 IF Y5 = 22 THEN 15205 
15202 M = SCRNl X5 - 1,Y5 » 2) + 

16 I SCRN( X5 - 1,Y5 t 2 + 

1) - 128: IF H < > 32 THEN 
RETURN 

15205 HTAB X5! VTAB YS: PRINT " 

I 

15210 Y5 = Y5 + 1: IF Y5 > 22 THEN 

RM = R2(RM,2)! GOTO 1000 
15220 GOTO 15120 
15300 IF X5 > 37 THEN 15305 

15302 M = SCRNl X5,Y5 » 2 - 2) + 
16 » SCRNl X5,Y5 t 2 - 1) - 
128! IF M < > 32 THEN RETURN 

15303 M = SCRNl X5 + 1,Y5 I 2 - 
2) + 16 » SCRNl X5 + 1,Y5 « 

2 - 1) - 128: IF II < ) 32 THEN 
RETURN 
15305 HTAB X5: VTAB Y5: PRINT " 

15310 X5 = X5 + 2: IF X5 > 39 THEN 

RM = R2IRM,3)! GOTO 1000 
15320 GOTO 15120 
15400 IF X5 ( =2 THEN 15405 

15402 M = SCRNl X5 - 2,Y5 t 2 - 

2) + 16 t SCRNl X5 - 2,Y5 » 

2 - 1) - 128: IF M < > 32 THEN 
RETURN 

15403 M = SCRNl X5 - 3,Y5 I 2 - 
2) + 16 I SCRNl X5 - 3,Y5 « 

2 - 1) - 128: IF M < > 32 THEN 
RETURN 
15405 HTAB X5: VTAB Y5! PRINT " 

15410 X5 = X5 - 2: IF X5 < 1 THEN 

RM - R2IR«,4)! GOTO 1000 
15420 GOTO 15120 

Nomal arrow firing routine. 

15500 GOSUB 15699 

15505 X = RND (1) / 2: IF RC * 1 
THEN X = X - .1 

15506 IF RC = 2 THEN X = X + .1 

15507 X = X - (EP / 1000) 

15510 X = X - .2 

15511 X = X - IDX / 100) 
15515 IF X > W THEN RETURN 
15520 X = RND (1): IF RC = 1 THEN 

X = X + .2 

15522 IF RC < > 1 THEN X = X + 
.1 

15523 IF RC = 2 THEN X = X + .1 
15525 MS = MS - X: RETURN 
15599 RETURN 



Magic arrow firing routine. 

15600 GOSUB 15699 

15601 IF MIIRM) = 8 THEN RETURN 

15605 X = RND ID / 2: IF RC = 1 
THEN X = X - .1 

15606 X = X - (DX / 100) 

15607 IF RC = 2 THEN X = X ^ .1 

15608 X = X - lEP / 1000) 
15610 IF X ) W THEN RETURN 

15620 X = RND 10): IF RC = 1 THEN 
X = X + .1 

15621 IF RC = 2 THEN X = X - .1 
15625 MS = MS - X: RETURN 

15698 RETURN 

Calculate monster range, aim, and 
shoot arrow graphically. 

15699 IF WX = THEN WX = 31: IF 
WY = THEN WV = S 

15700 X6 = X5:Y6 = Y5 - l!X7 = WX 
!Y7 = WY - 1 

15701 IF X6 = X7 THEN SL = 0:X8 = 
X7:X9 = Xi 

15702 IF X6 < > X7 THEN SL = (Y 
6 - Y7) / 1X6 - X7)!X8 = X6! 
X9 = X7 

15703 GOTO 1570B 

15705 IF X6 > X7 THEN SL = IY6 - 
Y7) / 1X6 - X7):X8 = X6:X9 - 
X7 

15706 IF X7 > X6 THEN SL = IY7 - 
Y6) / 1X7 - X6)!XB = X7!X9 = 
X6 

15707 IF X7 = X6 THEN SL = 0:XB = 
X7:X9 = Xi 

15708 Y8 = Y6:Y9 = Y7 

15709 Y = Y8 

15710 SL = SL « SGN IY8 - Y9): IF 
Y6 < Y7 THEN SL = - SL 

15711 IF X6 > X7 THEN SL = - SL 

15712 FOR X = X8 TO X9 STEP SGN 
1X9 - X8 + .01): FDR XX = 1 TO 
20: NEXT XX 

15713 IF Y ) 23 OR Y < 1 OR X > 

40 OR X < 1 THEN NEXT X: GOTO 

15750 
15715 IF SCRNl X - 1, INT lY) I 

2 - 2) + SCRNl X - 1, INT I 

Y) » 2 - 1) « 16 = 32 THEN X 

9 = X - 1: GOTO 15750 
15720 HTAB X: VTAB Y: PRINT "+»• 

:Y = Y + SL: NEXT X 
15750 Y = Y8: FOR X = X8 TO X9 STEP 
SGN 1X9 - X8 + .01): HTAB X 

continued on next page 



SoftSidc August 1981 



39 



continued from previous page 






: VTAB Y: PRINT " ";:Y = Y + 


13000 M = !11(R,1): IF M =• 2 OR M = 


HUMAN" 


SL: NEXT X 


5 OR M = 7 ■'HEN RETURN 


20036 IF F:C = 1 THEN PRINT "ELF 


15760 RETURN 


1S005 GOSUB 15699: HTAB WX: VTAB 


It 




WY: PRINT " "liXA = WX:WB = 


20037 IF RC = 2 THEN PRINT "DWA 


Subroutine for close coobat with a 


WY:WX = X5:WY = Y5: BOSUB 16 


RF" 


oicnster. 


000:WX = WA:WY = WB: HTAB X5 


20040 PRINT "WOUNDS: ";W » 100;" 




: VTAB Y5: FLASH : PRINT YY» 


7." 


iiOOO IF ABS as - WX) > 1 OR ABS 


;: NCRMAL : RETURN 


20045 PRINT "HEALING POTICNS: "; 


(Y5 - WY) > I THEN RETURN 




PT 


16001 IF HKRH) = 8 THEN RETURN 


Take care of 'end-of-quest' 


20046 PRINT "HOLY WATER: "jHW 




procedures such as saving gaies 


20050 PRINT -'ARROWS: "jAi;" HA 


16002 IF HKRM) = 7 THEN RETURN 


on tape or disk, and printing out 


GIC ARROWS: "iA2 




information on the player's 


20055 PRINT "SOLD: "iGP;" EXPE 


16003 IF flKRM) = 6 THEN W = W - 


fighter. 


RIENCE: "jEP 


.05 




20060 PRINT "STRENGTH: "jSTi" 


16005 X = RNO (1): IF RC = THEN 




DEXTERITY: ";DX 


X = X - .1 




20065 INPUT "WOULD YOU LIKE TO T 


16006 X = X - (DX / 100) 


20000 INPUT "WOULD TO LIKE TO SE 


RY AGAIN AS A INEWI CHARACT 


16007 IF RC = 2 THEN X = X - .3 


E THE TREASURES THAT YOU RET 


ER '";A»: IF LEFT* (A*,l) = 


16003 X = X - (EP / 1000) 


RIEVED FROM THE DUNGEON ?";A 


"Y" THEN RUN 


16010 IF X > W THEN RETURN 


$: IF LEFT$ (A$,l) = "Y" THEN 


20099 PRINT : PRINT "COME 3UESTI 


1601! X = RND (1): IF RC = THEN 


FOR X = 1 TO 9: PRINT Tt(X) 


NG AGAIN SOMETIME'.!!": END 


X = X + .1 


; TAB( 30)iTS(X): NEXT X 




16016 X = X + (ST / 100) 


20010 FOR X = 1 TO 9:TS{X) = 0: NEXT 




16017 IF RC = 2 THEN X = X + .2 


X 




16020 MS = MS - X: RETURN 


20011 Al = Al + A3:A2 = A2 + A4 


Subroutine to create new fighter 




20015 INPUT "WOULD YOU LIKE TO S 


characters. 


Subroutine for obtaining a 


AVE THIS GAME ?"iA$ 




treasure. 


20017 IF LEFT! (A$,l) < > "Y" THEN 
20028 




170C0 IF ABS (TX - X5) > 1 THEN 


20018 INPUT "DISK OR CASSETTE ?" 


21000 PRINT "OK, I'LL MAKE YOU 


RETURN 


iA$: IF LEFT$ (A$,l) = "C" THEN 


NE.": FOR X M TD 1000: NEXT 


17005 IF ABS (TY - Y5) > 1 THEN 


INPUT "HIT (RETURN) TO BEGI 


X 


RETURN 


N SAVE ";A$: PRINT : PRINT " 


21005 GP = FN A(20) + 5:ST = FN 


17010 HTAB TX: VTAB TY: PRINT " 


(WAIT FOR SIX BEEPS.)": STORE 


A(17) + 3:DX = FN All?) ♦ 3 


>> 1 
1 


Rl: STORE M2: STORE Tl: GOTO 


:RC = FN A(3) - 1:A1 = 3:A2 


17011 TX = 0:TY = 


20027 


= FN A(10):PT = FN A(3) + 


17015 HTAB 3: VTAB 24: PRINT T$i 


20019 IF LEFT* (A$,l) < > "D" THEN 


1:HW = FN A(5):EP = 0:W = 1 


TKRM));: FOR X = 1 TO 1000: 


20018 




NEXT X 


20020 INPUT "ENTER FILENAME >"iA 


21010 PRINT "STRENGTH: ";S1\" 


17020 FOR X = 8 TD 35: HTAB X: VTAB 


i 


DEXTERITY: ";DX 


24: PRINT " "i: NEXT X 


20021 PRINT D«i"OPEN "jA* 


21015 PRINT "GOLD: "iGPj" HEALI 


17021 IF TKRM) = 10 THEN PT = P 


20022 PRINT Dl; "DELETE ";At 


NG POTIONS: "jPT 


T + 1: GOTO 17026 


20023 PRINT D$;"OPEN "jAI 


21020 PRINT "HOLY WATER: "jHW;" 


17022 IF TKRH) = 11 THEN A2 = A 


20024 PRINT D»; "WRITE ";A$ 


RACE: ";: IF RC = THEN PRINT 


2 + 10: eOTO 17026 


20025 FOR X = 1 TO 58: PRINT MK 


"HUMAN" 


17023 IF TKRM) = 12 THEN Al = A 


X): PRINT M2(X): PRINT TKX) 


21021 IF RC = 1 THEN PRINT "ELF 


1 + 10: GOTO 17026 


: NEXT X 


II 


17024 TS(T1(RM)) = TS(T1!RM)) + I 


20026 PRINT D$; "CLOSE "iA$ 


21022 IF RC = 2 THEN PRINT "DWA 




20027 PRINT "SAVE COMPLETE." 


RF" 


17025 6P = GP + GP(T1(RI1)) 


20028 INPUT "WOULD YOU LIKE TO S 


21025 PRINT "ARROWS: "-.Al;" MA 


17026 EP = EP + EP(T1(RM)):TURH) 


TOP NOW ?"iA*! IF LEFTI (A* 


GIC ARROWS: "iA2 


= 


,1) < > "Y" THEN RETURN 


21030 INPUT "WHAT WILL YOU NAME 


17030 RETURN 


20030 PRINT "OK. SO THAT YOU CA 


THIS CHARACTER ?";NM*: 




N USE THIS CHARACTER AGAIN A 


PRINT "HAVE A FUN QUEST, "; 




T A LATER TIME" 


NM*;"!!1": FOR X = 1 TO 1000 


Subroutine to throw a flask of holy 


20035 PRINT "NAME: ";NM$i" RACE: 


: NEXT X: HOME 


water. 


";: IF RC = THEN PRINT " 


21040 RETURN Q 



40 



SaftSidc August 1981 






-pOSVA 60TT0H 



y^ 






»'^^°'^^Tr* is otter good unt.»9'l^ 



< 



ivTARl 8001400 

-,*.r»K «or th® '^ „ok ever design 
y^^^^^V^isofVer good unt» 9'^^ "'!:: 









o^Ner-case cn» ^ r"*"'.*- 1= supP*'®^ "^ ^ohie to drive the 






raww 



"^a^ ","" n^hs „ fixceptions) 

form lengths. . . ■ , . ^o excep 

t»'^^°%WsoHergoodunt.i9M 



=rsTlBC^"°' ^r^cKfacoeVeO ^'^rshTpVa 
and A\t F'«'9n^ 



yft«_ 



SoftSide 



August 



1981 



41 




Battlefield 



by Joe Humphrey 

Atari and S-80 translations by Jon 
Voskuil 



"Battlefield" is an S-80, Apple, and 
Atari game requiring 16K RAM. 



"Battlefield" is a game of strategy 
for two players, in which the object is 
to overpower the opponent's forces 
and capture squares on the playing 
board. The players both start out with 
40 squares on an eight-by-ten board, 
and alternate moving forces around the 
board to do battle with one another. 

At the beginning of the first player's 
turn, new forces are added to each of 
the squares along the right and left 
edges of the board. The number of new 
forces that each player receives 
depends on how much territory he 
owns, how many edge squares he 
owns, and how crowded his edge 
squares are. (No square may contain 
more than 99 forces.) 

At the same time, each player's 
Movement Allowance (M.A.) is in- 
creased by an amount proportional to 
the territory he owns. The M.A. limits 
the amount of movement on each turn. 
For example, moving five forces 
through two squares, and then three 
other forces through six squares, uses 
up 5-times-2 plus 3-times-6, or 28, 
movement points. A player's turn ends 
when he has exhausted his Movement 
Allowance or when he presses "E". 
(Unused M.A. is carried over to the 
next turn.) 

Forces are moved using the number 
keys and four directional keys. The 
board display will show a pair of "#" 
symbols bracketing one of the squares; 
these constitute the "cursor". The cur- 
sor can be moved up, left, right, or 
down by pressing I, J, K, or L (these 
keys form a diamond-shaped pattern 
for convenient right-hand use). To 
move forces, you position the cursor 
on a square occupied by your forces, 
type in the number of forces you want 
to move, and then use the directional 
keys to move them. To leave some 
forces in a given square, just type "0" 
or backspace to cancel the current 
number of forces being moved. 

You can move your forces freely, in 
any direction, through your own ter- 
ritory. Once a group of forces crosses 
into enemy territory, however, they 
cannot move further during that turn. 
42 



When a square is thus occupied by 
forces from both sides, a pair of letters 
is shown in that square rather than a 
number of forces. These letters show 
the relative number of forces in that 
square: The pair "YB" would show 
very unequal force strengths, while the 
pair "MM" would show equal forces 
from both sides. At the end of each 
turn, battles are fought to the death in 
all such jointly-occupied squares, and 
the surviving forces of the winner then 
remain in the squares. 

These battles for individual squares 
are usually, but not always, won by the 
side with more forces in the square. 
Assume that the forces in a square are 
15 of side A and 10 of side B. In the 
first round of the battle, there will be a 
10/(15 + 10), or 0.4, probability that 



one of A's forces will be destroyed; at 
the same time there will be a 
15/(15 + 10), or 0.6, probability that 
one of B's forces will be destroyed. At 
the end of the first round, then, the re- 
maining forces could be 15:10, 14:10, 
15:9, or 14:9. Assuming that the actual 
results are 15:9, the second round 
would be fought with new probabilities 
of 9/(15 + 9) and 15(15 + 9), or 0.31 
and 0.69 respectively. Rounds continue 
in this fashion until one player's forces 
are completely destroyed in that 
square. 

If you should want to reduce the size 
of the "Battlefield" playing board, to 
shorten and simplify the game, it's 
easily done by changing hne 70. NC is 
the number of columns and NR the 
number of rows. 



VARIABLES 



AR: Vertical tab or PRINT® loca- 
tion for Movement Allowance. 
B$: Black's square marker. 
BC$: Background character (CU$ or 
SP$). 

BELLS: Beeps the speaker. 
BL: Index to black player ( = 0). 
BS$: Backspace character, CHR$(8). 
CC: Cursor column. 
CHS: A character. 
CL$: Atari clear-screen character, 
CHRS(125). 

CLEOS: Address of Apple routine to 
clear to end of screen ( = -958). 
COL: A column on the board. 
CP: Controlling player in a square. 
CP(*,*): ControlUng player in each 
square of array. 
CU$: Cursor character, "#". 
D: Sound distortion number. 
DC: Change in column CC (-1,0, + 1). 
DC(*): Change in column for each 
player. 

DF: Digit flag; = 1 if a digit was just 
typed. 

DR: Change in row CR. 
EC(*): End-of-line column for each 
player. 

F: Boolean "false" value ( = 0). 
FR: Vertical tab or PRINT® position 
for number of forces. 
HC: Half of NC. 
IPL: Index to a player. 

SoflSide August 1981 



IV: Value for printing normal ( = 0) 
or inverse ( = 128) character. 
KB: Address of Apple keyboard buf- 
fer. 

LC(*): Label column for each player. 
LP: Timing-loop counter. 
MA(*): Movement Allowance for 
each player. 

MC: Maximum column index 
( = NC-1). 

MF(*): Maximum number of incom- 
ing forces per square for each player. 
MG: Maximum value of NG allowed. 
MR: Maximum row index ( = NR-1). 
NB: Number of black forces in a 
square. 

NC: Number of columns on board. 
NF: Number of forces to add to a 
square. 

NG: Number of forces in a moving 
group. 

NR: Number of rows on board. 
NS(*): Number of squares owned by 
each player. 

NW: Number of white forces in a 
square. 

PC: Player's name column. 
PF: Previous value of DF. 
PL: Index to current player. 
PNS, PNIS, PN2$, PN$(*): Strings 
used for players' names. 
PR: Player's-name row. 
ROW: A row on the board. 



S: Flag for sound generation. 

SF: A square's number of forces. 

SF(*,*), SF(*,*,*): Square's forces in 

each square, for each player. 

SP$-. Space character. 

SR: Vertical tab or PRINT® position 

for squares owned. 



T: Boolean "true" value (=1). 
TF(*): Total forces for each player. 
V: Sound volume value. 
W$: White's square marker. 
WH: Index to white player ( = 1). 
WP$: Winning player's name. 
X$: Temporary and utility string. 



APPLE VERSION 

Main progran control routine. 



60 CLEAR 
70 NC = SiUR = 10 
SO GOSUB 1000 
90 GOSUB 2000 
100 GOSUB 3000 
110 GOSUB 4000 
120 GOSUB 5000 
130 GOSUB &000 
140 GOSUB 7000 
ISO GOSUB 8000 
160 HOME ! END 

Print instructions. 

1000 TEU ! HOME 

1010 PRINT "BATTLEFIELD! A JERRI 

TORIftL GAME," 
1020 PRINT "WRITTEN BY JOE HUMPH 

REY, NOV 1980." 
1030 PRINT 
1040 PRINT " T«0 PLAYERS, BLAC 

K AND WHITE, ARE ON" 
1050 PRINT "A ";NC)"r'jNR;" BOAR 

D. A SSUARE OWNED BY BLACK" 

1060 PRINT "IS SHOWN WITH THE NU 

MBER OF BLACK" 
1070 PRINT "FORCES IN THAT SQUAR 

E, AGAINST A BLACK" 

1080 PRINT "BACKGROUND; ft WHITE- 
OWNED SQUARE HAS A' 
1090 PRINT "WHITE BACKGROUND. A 

SQUARE CONTAINING" 
1100 PRINT "BOTH SIDES' FORCES I 

S SHOWN WITH" 
1110 PRINT "LETTERS REPRESENTING 
THE RELATIVE FORCE" 



1120 PRINT "SIZES; AT THE END OF 

EACH TURN, A" 
1130 PRINT "BATTLE IS FOUGHT (TO 

THE DEATH) IN EACH" 
1140 PRINT "OF THESE SflUARES, TO 

DETERMINE WHO OWNS" 
1150 PRINT "IT. THE FIRST PLAYE 

R TO OWN ALL ";NC t NR 
1160 PRINT "SQUARES WINS." 
1170 PRINT " AT THE BEGINNING 

OF BLACK'S TURN," 
1180 PRINT "NEW FORCES COME ONTO 

EACH SIDE, AND" 
1190 PRINT "EACH SIDE'S MOVEMENT 

ALLOWANCE (M.A.)" 
1200 PRINT "IS INCREASED (THE M. 

A. DETERMINES HOW" 
1210 PRINT "MANY FORCES HAY BE M 

OVED AROUND)." 
1220 RETURN 

Initialize variables. 

2000 BL = OiWH = 1 

2010 F = OiT = 1 

2020 MC = NC - 1:MR = NR - 1 

2030 DIM DC(1),EC(1),LC(1),PC(1) 

2040 DIM MA(1),MF(1),NS(1),PN$(1 

),TF(1) 
2050 DIM CP(MC,MR),SF(1,MC,MR) 
2060 LC(BL) = l!DC(BL) = 16;EC(BL 

) = 21 
2070 LC(WH) = LC(BL) + 20:DC(WH) = 

DC(BL) + 20:EC(WH) = EC(BL) + 

19 
2080 PR = 16!FR = PR + 2iSR = FR + 

2:AR = SR + 2 
2090 BSJ = CHR» (8): BELLS = CHR« 

(7) 
2100 SP$ = " "!CU$ = "tt" 
2110 CLEDS = - 95B!KB = - 16384 



2120 HC = INT (NC / 2) 
2130 FOR ROW = TO MR 
2140 FOR COL = TO HC - 1:CP(CG 

L,ROW) = BL: NEXT COL 
2150 FOR COL = HC TO MCiCP(COL,R 

OW) = WH! NEXT COL 
2160 NEXT ROW 
2170 NS(BL) = NR I HC;NS(WH) = Nfi 

I NC - NS(BL) 
2180 RETURN 

Input players' names. 

3000 VTAB 23: INPUT "BLACK PLAYE 

R'S NAME? ";PN» 

3010 IF PN$ = "" THEN PNt = "BLA 

CK" 

3020 PN»(BL) = LEFT* (PN»,19):PC 

(BL) = 11 - LEN (PN$(BL)) / 

2 

3030 VTAB 23: CALL CLEOS: INPUT 

"WHITE PLAYER'S NAME? ";PN$ 

3040 IF PN$ = "".THEN PNt = "WHI 

TE" 

3050 PN$(WH) = LEFT! (PN»,19):PC 

(WH) = 31 - LEN (PNKWH)) / 

i. 
3060 RETURN 

Draw playing field and display 
player data. 

4000 BC» = SP$ 

4010 VTAB 4: HTAB 1: CALL CLEOS 

4020 FOR ROW = TO MR: FOR COL = 

TO MC 
4030 GOSUB 9000 
4040 NEXT COL: NEXT ROW 
4050 FOR IPL = BL TO WH 
4060 VTAB PR 
4070 HTAB LC(IPL): PRINT TAB( P 

C(IPL));PNt(IPL); TAB( EC(IP 

D): PRINT 
4080 HTAB LC(IPL): PRINT TAB( E 

C(IPL))! PRINT 
4090 HTAB LCdPL): PRINT "TOTAL 

FORCES :"j TAB( DC(IPL));TF( 

IPD) TAB( ECdPD): PRINT 
4100 HTAB (LC(IPL))! PRINT TAB( 

ECdPD): PRINT 

continued on next page 




-?^ 1." 



SoftSide August 1981 



43 




/ 



r-^-»:i<i-f— ---^c 



M:*?'/--^- 



continued from previous page 

4110 HTAB LCdPL): PRINT "SQUARE 
S OWNED:"! TflBI DC(IPLI)iNS( 
IPD) TfiBI EC(IPL))! PRINT 

4120 HTflB LCdPDi PRINT TftB( E 
C(IPLl)! PRINT 

4130 HTAB LC(IPL)! PRINT "MOVEUE 
NT LEFT;"; TAB( DC(IPL) Ijllfli 
IPDi TAB( ECdPD) 

4140 INVERSE : NEXT IPL 

4150 NORHAL 

4160 RETURN 

Begin Black's turn. Add new forces 
to edge squares and increase 
iioveaent alloHances, 

5000 BC» = SP» 

5010 FOR IPL = BL TO WH 

5020 NFdPL) = INT (NSdPL) / NR 

) + 1 
5030 NEXT IPL 
5040 FOR ROH = TO NR: FOR COL = 

TO MC STEP NC 
5050 CP = CP(CQL,ROW):SF = SF(CP, 

COL, RON) 
5060 NF s NF(CP)! IF SF + NF > 99 

THEN NF = 99 - SF 
5070 IF NF > THEN SF(CP,COL,RO 

H) = SF + NF! GOSUB 9000 
5080 TF(CP) = TF(CP) + NF!NA(CP) = 

HA(CP) + IIF(CP) 
5090 NEXT COL: NEXT RON 
5100 VTAB FR: HTflB DCIBL): PRINT 

TF(BL)! TflBt ECIBL));: INVERSE 

! HTflB DC(«H)! PRINT TF(HH)) 
TAB! ECIWH))-,! NQRtlAL 
5110 VTAB flR! HTAB DC(BL)! PRINT 

MA(BL)i TflBI EC(BL))!! INVERSE 

: HTflB DC(WH)! PRINT dfllHH); 
TflB( ECIWH));: NORHAL 
5120 PL = BL:CC = 
5130 RETURN 



Execute player's noves; love len 
until done or until his loveient 
allowance is exhausted. 



6000 CR = INT (NR / 2) 

6010 NG = 

6020 PF = F 

6030 VTAB PR: HTflB PC (PL): FLASH 

; PRINT PN$(PL); 
6040 BC« = CU$:COL = CC:ROH = CR: 

SOSUB 9000 
6050 GOSUB 11000 
6060 H8 = SFIPL,CC,CR) 
6070 IF HA(PL) = THEN 6120 
6080 GOSUB 10000 
6090 IF CH$ = "H" THEN 6030 
6100 IF CHI = m OR DF THEN 605 


6110 IF CH« < > "E" AND CH« ( > 

"S" THEN 6060 
6120 BC$ = SP$:COL = CC:ROW = CR: 

GOSUB 9000 
6130 NG = 0: GOSUB 11000 
6140 NORMAL : IF PL = «H THEN INVERSE 
6150 VTAB PR: HTfiB PC IPL): PRINT 

PN«IPL)i; NORMAL 
6160 RETURN 

Fight battles to the death in all 
squares which contain both players' 
forces. 



7000 IF NS(PL) = THEN 7170 
7010 FOR ROM = TO MR: FOR COL = 

TO MC 
7020 CP = CPICOL.ROW): IF CP = PL 
OR SFIPL,CDL,RQN) = THEN 

7160 
7030 NSICP) = NS(CP) - 1 
7040 NB = SFIBL,COL,R0W)!NW = SF( 

NH,COL,RON) 
7050 IF N« < > NB THEN CP(COL,R 

OW) = INN > NB) 
7060 IF NN I NB = THEN 7130 
7070 SF = NB + NU 
7080 IF NB < SF t RND (1) THEN 

NB = NB - l!TF(BL) = TF(BL) - 

1 
7090 IF NN < SF » RND ID THEN 

NN = NW - 1:TF(WH) = TFINH) - 

1 



7100 VTAB FR: HTAB DCIBL); PRINT 
TFIBL); TflBI EC(BL))): HTAB 
DCINH): INVERSE : PRINT TFIW 
H)) TAB( ECINH))): NORMAL 

7110 SFIBL,COL,RON) = NB:SF(«H,CO 
L,RON) - NH 

7120 GOSUB 9000: GOTO 7050 

7130 8QSUB 9000 

7140 CP = CPICaL,ROW):NSICP) = NS 
(CP) + 1 

7150 VTAB SR: HTAB DC(BL): PRINT 
NS(BL); TAB( ECIBL));: HTAB 
DCINH): INVERSE ! PRINT NS(« 
H)j TAB( ECIWH));: NORMAL 

7160 NEXT COL: NEXT ROW 

7170 RETURN 

End of a turn. Check for end of 
gaae; if not, transfer control to 
other player. 

8000 IF NSIBL) $ NSINH) > THEN 

8100 
8020 WP$ = PN$(BL): IF NSIBL) = 

THEN NP$ = PN$IWH) 
8030 VTflB 23: HTAB 1: CflLL CLEOS 

8040 HTflB 18 - LEN {WP$) / 2: FLASH 

: PRINT WP»;" WINS" 
8050 NORMAL : PRINT "ANOTHER SAM 

E lY/N)? "; 
8060 GET CH» 

8070 IF CH» = "N" THEN 3130 
8080 IF CH$ < > "Y" THEN 8060 
8090 POP : GOTO 60 
8100 IF PL = WH THEN POP : GOTO 

120 
8110 PL = NH:CC = MC 
3120 POP : GOTO 130 
8130 RETURN 

Print the contents of position 



9000 CP = CP(COL,ROW) 

9010 NORMAL : IF (BC$ = SPt AND 
CP = WH) OR (BC$ = CU« AND P 
L = WH) THEN INVERSE 



44 



SoftSide August 1981 



902C VTflB ROW + 4; HTAB 4 « COL + 

6! PRINT BC»; 
9030 VTflB ROW + 4! HTAB 4 « COL + 

3: PRINT BCJj 
9040 NB -- SF(BL,COL,ROW):NW = SF( 

WH,COL,ROW):SF = NB + NW 
9050 IF SF( NOT CP, COL, ROW) = THEN 

9090 
90i0 NORMAL ; PRINT CHR$ (NB / 

SF « 25 i ftSC {"A"))i 
9070 INVERSE ! PRINT CHR$ (N« / 

SF » 25 + ASC ("A")); 
9080 GOTO 9120 

9090 NORMAL ! IF CP = WH THEN INVERSE 
9100 IF SF < 10 THEN PRINT " "; 

9110 PRINT SF; 
9120 NORMAL 
9130 RETURN 

Input and execute a coimand. 

10000 IF PEEK (KB) < 128 THEN 1 

0000 
10010 GET CH$ 
10020 POKE - li36B,0 
10030 OF = (CH» > - "0" AND CH$ < 

= "9"): DC = 0:DR = 
10040 IF DF AND NOT PF THEN NG = 


10050 PF = DF 
lOOiO IF DF THEN NG = 10 t NG + 

VAL (CH$)! GOTO lOUO 
10070 IF CH$ = BS$ THEN N6 = INT 

(NG / lOliPF = l! GOTO lOliO 

10080 IF CH» = "E" THEN 10160 
10090 IF CH» = "H" THEN 60SUB 1 
2000! GOSUB 4000: GOTO 10160 

10100 IF CHt = "I" THEN DR = - 

l! GOSUB 13000: GOTO 10160 
10110 IF CH$ = "J" THEN DC = - 

1: GOSUB 13000: GOTO 10160 
10120 IF CHt = "K" THEN DC = 1: GOSUB 

13000: GOTO 10160 
10130 IF CH$ = "N" THEN DR = 1: GOSUB 

13000! GOTO 10160 



10140 IF CH» = "S" THEN NS(PL) 

0: GOTO 10160 
10150 PRINT BELL$) 
10160 RETURN 



Adjust the number of forces being 
moved, and update the screen 
display, 



11000 IF CP(CC,CR) < > PL THEN 

NG = 
11010 IF NG > M6 THEN N6 = NG 
11020 IF NG > MA(PL) THEN N6 = M 

A(PL) 
11030 VTAB 24: HTAB 1: NORMAL 
11040 IF NG = THEN PRINT TAB( 

12); "(TYPE ";: INVERSE : PRINT 

"H";: NORMAL : PRINT " FOR H 

ELP)";: GOTO 11080 
11050 PRINT TAB( ID) "(MOVING " 

)N6;" FORCE"; 
11060 IF NG > 1 THEN PRINT "S") 

11070 PRINT ">"; 
11080 CALL CLEOS 
11090 RETURN 



Print a list of caimands (in 
response to <H>elp request). 



12000 VTAB 4: HTAB 1: CALL CLEOS 

12010 PRINT "COMMAND! ","DESCRIPT 

ION:" 
12020 PRINT 
12030 PRINT "<-", "DELETE LAST DI 

GIT OF",, "NUMBER;" 
12040 PRINT "A NUMBER", "(E.G. 23 

) THE NUMBER OF",, "FORCES TO 

MOVE;" 
12050 PRINT "E","END TURN (THE T 

URN ALSO",, "ENDS WHEN THE MO 

VEMENT",,"ALLQt(ANCE REACHES 

0);" 



12060 PRINT "H", "PRINT THIS TEXT 

! 

12070 PRINT "I", "MOVE SOME FORCE 

S UP;" 
12080 PRINT "J", "MOVE SOME FORCE 

S LEFT;" 
12090 PRINT "K","MOVE SOME FORCE 

S RIGHT;" 
12100 PRINT "M","MOVE SOME FORCE 

S DOWN;" 
12110 PRINT "S", "SURRENDER TO TH 

E OTHER",, "SIDE." 
12120 VTAB 24: PRINT TAB( 7);"< 

HIT ANY KEY TO RESUME GAME)" 

12130 GET CH»:CH» = "H" 
12140 RETURN 



Move cursor and forces, and update 
screen display. 



13000 SF(PL,CC,CR) = SF(PL,CC,CR) 
- NG 

13010 BC$ = SP$:COL = CC:ROW = CR 
! GOSUB 9000 

13020 CC = CC + DC:CC = CC + (CC < 
0) - (CC > MO 

13030 CR = CR + DR:CR = CR + (CR < 
0) - (CR > MR) 

13040 FS = SF!PL,CC,CR): IF FS + 
NG > 99 THEN SF(PL,COL,RQW) = 
SF(PL,CQL,ROW) + NG - (99 - 
FS):NG = 99 - FS: GOSUB 9000 



13060 IF CC = COL AND CR = ROW THEN 

PRINT BELL$;!NG = 
13070 BC$ = CU$:COL = CC!ROW = CR 

: GOSUB 9000 
13080 MA(PL) = HA(PL) - NG: GOSUB 

11000 
13090 NORMAL : IF PL = MH THEN INVERSE 
13100 VTAB AR: HTAB DC(PL): PRINT 

MA(PL); TAB( EC(PL)); 
13110 NORMAL 
13120 RETURN 

continued on next page 




g^nf^^ ^i^r-jfr -- ^:; '^■^^ ' : ' , ' ;'^-^-i:'-.:;J ^^-^^ ^'^y x ■ ji, ■ .- . -y ;-,-.- 



■ r 



SoftSide August 1981 



45 




ATARI VERSION 



continued from previous page 



10 SOTO 70 

Subroutine to print « norssl or 
inverse character. 

20 FOR 1=1 TO LEN()(»):PRINT CHR$(ASC(X 
$(I,lllHV);;NEn IsRETURN 

SubroutiRe to print the contents of 
positisn (COL, ROM) to the screen. 

30 CP=CP(COL,ROIi):IV=0:IF <BC»=SP$ AND 
CP=tlHI OR (BCt=CU( AND PL>)IH) THEN IV 

=128 

32 IF S THEN SOUND 0,RND(1)«20+20,D,V 

34 POSITION 4<C0U6,R0N+2:1((=BC(:B0SUB 
20:SOUND 0,0,0,0:POSITION 4IC0L+3,R0M 

+2iG0SUB 20 

36 NB=SF(COL,ROM):NH=SF(COLfNC,ROU):SF 

=NB+NH:IF SF(COL+(l-CP)tNC,RON)=0 THEN 
40 

38 IV=0:)($=CHR«(NB/SFt25+65)!60SUB 20i 

IV=128!l((=CHR$(NM/5Ft25^&S):G0SUB 20sG 

OTO 46 

40 IV=0!lF CP=MH THEN IV=128 

42 IF SF<10 THEN X$=" "!X«(2)=STR$(SF) 

iSOSUB 20; GOTO 46 

44 Xt=STRt(SF):60SUB 20 

46 IV=0! RETURN 

Main prograii control routine, 

70 NC=8:NR=10 

75 DIN CL$(1):CL$=CHR$(125) 

78 POKE 752,1 

80 GOSUB 1000 

90 GOSUB 2000 

100 GOSUB 3000 

UO GQSUB 4000 

120 GOSUB 5000 

130 GOSUB 6000 

140 GOSUB 7000 

m GOTO 8000 

160 PRINT CL»!END 



Print instructions. 



nut 



1000 PRINT CL$rBATTLEFlELD 

BY JOE HUHPHREY" 

1010 PRINT :PRINT ' (ATARI TRANSLATIO 

N BY JON VOSKUID' 



1030 PRINT 

1040 PRINT " m PLAYERS, BLACK AND 

WHITE, ARE ON A "iNC;" BY ';NR;' BOAR 
D. A SQUARE DMNED" 
1050 PRINT -BY BLACK IS SHONN WITH THE 

NUNBER OF FORCES IN THAT SBUARE AGAI 
NST A BLACK' 

1060 PRINT 'BACKGROUND; A WHITE-OWNED 
SQUARE HAS A WHITE BACKGROUND.' 
1070 PRINT ' SQUARES CONTAINING BOT 
H SIDES' FORCES ARE SHONN WITH LETT 
ERS REPRE-" 
1080 PRINT "SENTING THE RELATIVE FORCE 

SIZES. AT THE END OF EACH TURN, BATT 
LES ARE" 

1090 PRINT "FOUGHT IN EACH OF THESE SO 
UARES, TO DETERniNE WHO OWNS THEN. 
THE FIRST" 

1100 PRINT "PLAYER TO OWN ALL THE SQUA 
RES WINS." 

AT THE BEGINNING OF EA 
NEW FORCES ARE ADDED TO EA 



1110 PRINT 
CH ROUND, 
CH SIDE,' 
1120 PRINT 



'AND EACH SIDE'S NOVENENT A 



LLOWANCE IS INCREASED.' 
1130 RETURN 

Initialize variables. 

2000 BL=0!WH=1 

2010 F=0!T=1 

2020 nC-NC-l!MR=NR-l 

2030 DIN DC(l),EC<ri,LC!l!,PC.l) 

2040 DIN HA(I),NF(1),NS(1),TF(1),PN1$( 

20),PN2$(20),WP$(15) 

2050 DIN CP(HC,NR),SF(NCt2,HR) 

2055 FOR 1=0 TO l:l1A(I)=0iHF(I)=0:TF(I 

)=0:NEn I 

2060 LC(BL)=4!DC(BL)=13!EC(BL)=21 

2070 LC(WH)=LC(BL)+20iDC(WH)=DC(BL)+20 

:EC(WH)=EC(BL)+19 

2080 PR=15! FR=PR+2! SR=FR+2! AR=SR+2 

2090 DIN BS$(1),SP$(1),CU»(1I,BC$(1),X 

$(20),CH«(l) 

2100 SP»=" ":CU$="»° 

2120 HC=INT(NC/2) 

2130 FOR ROH=0 TO NR 

2140 FOR COL=0 TO HC-l!CP(COL,ROW)=BL: 

NEXT COL 

2150 FOR COL=HC TO «C:CP(CDL,ROW)=WHiN 

EXT COL 

2160 NEXT ROW 



2170 NS(BL)=NRtHC!NS(WH)=NRtNC-NS(BL) 
2175 FOR COL=0 TO NC»2:F0R ROW=0 TO NR 
iSF(COL,ROW)=0:NEXT ROMjNEXT COL 
2180 OPEN 12,4,0, "K!" 
2190 RETURN 

Input players' naies. 

3000 POKE 752,0:P0SITI0N 2,22:PRINT 'B 

LACK PLAYER'S NAME: "|! INPUT PN1$ 

3010 IF PN1«="" THEN PN1$="BLACK' 

3020 IF LEN(PN1»>15 THEN PN1$=PN1»(1, 

15) 

3025 PC(BL)=9-LEN(PNl$)/2 

3030 POSITION 2,23:PRINT "WHITE PLAYER 



'5 NAME! 



! INPUT PN2$ 



3040 IF PN2»="" THEN PN2$='WHITE" 

3050 IF LEN(PN2$)>15 THEN PN2»=PN2$(1, 

15) 

3055 PC(WH)=29-LEN(PN2$)/2 

3060 POKE 752,l!RETURN 

Draw playing field ind display player 
data. 

4000 BC$=SP$ 

4010 PRINT CL$ 

4020 FOR ROW=0 TO NR:FOR COL=0 TO NC 

4030 GOSUB 30 

4040 NEXT COLiNEXT ROW 

4050 FOR IPL=BL TO WH 

4070 POSITION PCdPD.PRilF IPL=BL THE 

N PRINT PN1$| 

4075 IF IPL=WH THEN PRINT PN2$; 

4090 POSITION LC(IPL),FR:PRINT 'FORCES 
■ ■*• 

4095 POSITION DCdPD.FRsPRINT TF(IPL) 

i 

4110 POSITION LC(IPL>,SR!PRINT 'SQUARE 

a, , 

4115 POSITION DC(IPL),SRiPRINT NSIIPL) 

i 

4130 POSITION LC{IPL),AR!PRINT 'MOVENE 

NT: "i 

4135 POSITION DC(IPL),ARiPRINT NA(IPL) 

S 

4140 NEXT IPL 
4160 RETURN 

Begin Black's turn. Add new forces to 
edge squares and increase loveBent 
alloHances. 



46 



SoftSide August 1981 



5000 BC«=SP» 

5005 S=1:D=10!V=8 

5010 FOR IPL=BL TO WH 

5020 I1FI1PL)=INT(NSIIPL)/NR)+1 

5030 NEXT IPL 

50A0 FOR m-(> TO NRsFOR COL=0 TO tIC S 

rEP nc 

5050 CP=CPlCOL,ROM)!SF=SFlCOL+CP»NC,RO 
HI 

5060 NF=HF(CP):IF SF+NF>99 THEN NF=99- 
SF 

5070 IF NF>0 THEN SF(COL+CP«NC,RO»)=SF 
+NF:GOSUB 30 

5080 TF(CP)=TF(CP)+NF!NA(CP)=NA(CP)+HF 
(CPl 

5090 NEXT COLiNEXT ROH 
5100 POSITION DC(BL),FR:PRINT TFIBLIj" 
")!POSITI0N DC(I*H),FR!PRINT TF(WH)j" 

5110 POSITION DC(BL),ARiPRINT MftlBDi" 
■liPQSITION DC(HH),AR:PRINT HAINHIj" 

} 

5120 PL=BL!CC=0 
5125 S=0 
5130 RETURN 

Execute player's iDves; love len until 
done or until his noveient alloMance 
is exhausted. 

6000 CR=INT(NR/2) 

6010 N6=0 

6020 PF=F 

6030 POSITION PC(PL),PR:IV=128!X«=PN1$ 

!IF PL=KH THEN X»=PN2$ 

6035 GOSUB 20 

6040 BC$=CU»!COL=CC:ROM=CR:B0SUB 30 

6050 BOSUB 11000 

6060 NS=SF(CCtPL«NC,CR) 

6070 IF NA(PL)=0 THEN 6120 

6080 eOSUB 10000 

6090 IF CH»="H" THEN 6030 

6100 IF CH»=BS« OR DF THEN 6050 

6110 IF CH«<>"E" AND CH$<>'S" THEN 606 



6120 BC»=SP»!COL=CC:ROII=CR;eOSUB 30 

6130 N6=0:G0SUB 11000 

6150 IV=0:POSITION PC(PL),PR!X$=PN1«:1 

F PL=NH THEN X«=PN2» 

6155 60SUB 20 

6160 IV=0! RETURN 



Fight battles to the death in all 
squares which contain both players' 
forces. 

7000 IF NS(PL)=0 THEN 7170 
7005 S=l:D=4iV=12 

7010 FOR ROH=0 TO MR: FOR COL=0 TO NC 
7020 CP=CP(COL,ROm:IF CP=PL OR SFICOL 
+PLtNC,RON)=0 THEN 7160 
7030 NB(CP)=NS(CPI-1 
7040 NB=SF (COL+BLJNC, ROH) : NH=SF (COL+HH 
tNC,RDN) 

7050 IF NHONB THEN CP(COL,ROW) = (NN>NB 
) 

7060 IF NH»NB=0 THEN 7130 
7070 SF=NB+NH 

7080 IF NB<SF$RND(1) THEN NB=NB-l!TF(B 
L)=TF(BL)-1 

7090 IF NH<SF»RND(1) THEN NH=NH-1:TF(H 
HI=TF(NH)-1 

7100 POSITION DC(BL),FR:PRINT TFIBL);" 
'i:PDSITION DC(HH),FR:PRINT TF(HH);" 

H ( 
I 

71 10 SF (COLiBLtNC,ROM) =NB: SF (CDL+HHINC 

,ROH)=NH 

7120 GOSUB 30:60T0 7050 

7130 GOSUB 30 

7140 CP=CP(C0L,R0H)!NS(CP)=NS(CPI+1 

7150 POSITION DC(BL),SR:PRINT NSIBL);" 

"iiPOSITION DC(HH),SR:PRINT NS(MH);" 

■t . 
I 

7160 NEXT COL:NEXT ROH 

7165 5=0 

7170 RETURN 

End of a turn. Check for end of gaie; 
if not, transfer control to other 
player. 

8000 IF NS(BL)»NS(HH)>0 THEN 8100 

8020 WP$=PN1«:IF NS(BL)=0 THEN «P$=PN2 

$ 

8025 POSITION 11,23:PRINT " 

8030 FOR Z=l TO 10:P0SITI0N 2,21 
8035 SOUND 0,50,10,10 
8040 PRINT ■ 

■jsFOR ZZ=1 TO lOiNEXT ZZ 
8045 SOUND 0,100,10,10 
8050 POSITION 16-LEN(HPt)/2,2l!PRINT H 
P«i" HINS!!l"i!FaR ZZ=1 TO 20;NEXT ZZ: 



NEXT Z 

8055 SOUND 0,0,0,0 

8060 POKE 752,0!P0SITI0N 14,23:PRINT " 

ANOTHER GAHE"!! INPUT X»:IF X$="" THEN 

8060 

8070 IF X$(1,1)="N" THEN 160 

8090 RUN 

8100 IF PL=HH THEN 120 

8110 PL=HHiCC=HC 

8120 GOTO 130 

Input and execute a coniand. 

10000 GET 12, CH 

10010 CH$=CHR$(CH) 

10030 DF=(CH<>="0" AND CH$<=''9"):DC=0: 

DR=0 

10040 IF DF AND NOT PF THEN NG=0 

10050 PF=DF 

10060 IF DF THEN HS=lOmmLlCHt)!BOJ 

10160 

10070 IF CH»=BS» THEN NG=INT(NG/10):PF 

=1:G0T0 10160 

10080 IF CH»="E" THEN 10160 

10090 IF CH$="H' THEN GOSUB 12000: GOSU 

B 4000:60T0 10160 

10100 IF CH$="I' THEN DR=-1:60T0 10150 

10110 IF CH$="J" THEN DC=-1:G0T0 10150 

10120 IF CH*="K' THEN DC=l!GOTO 10150 

10130 IF CH»="N" THEN DR=1:G0T0 10150 

10140 IF CH«="S" THEN NS(PL)=0:GOTO 10 

160 

10150 GOSUB 13000 

10160 RETURN 

Adjust the nuiber of forces being 
Aoved, and update the screen display. 

11000 If CPiCC,CR)<>PL THEN NG 

11010 IF NG>MG THEN NG--nS 

11020 IF NG>HA(PL) THEN NG=NA(PL) 

11030 POSITION 11,23 

11040 IF NG=0 THEN PRINT "<TYPE H FOR 

HELP>"|:GOTO 11080 

11050 PRINT "(MOVING "jNG;" FORCE"; 

11060 IF N6>1 THEN PRINT "S"; 

11070 PRINT ">") 

11080 PRINT " "j 

11090 RETURN 

continued on next page 




SoftSide August 1981 



47 



continued from previous page 

Print i list of coiiands (in response 
to <H>elp request). 

12000 PRINT CL»iPRINT "CQNMANDi"," 
DESCRIPTION!" 

12010 PRINT iPRlNT "ft NUMBER", "NUMBER 
OF FORCES TO MOVE." 

12020 PRINT iPRINT "BflCKSPC", "DELETE L 
AST DIBIT OF NUMBER." 
12030 PRINT " E","END TURN BEFORE iiO 
VEMENT=0." 

12010 PRINT :PRINT " H", "PRINT THIS 
COMMAND LIST." 

12050 PRINT iPRINT " I", "MOVE SOME F 
ORCES UP. • 



12060 PRINT '.PRINT " J", "MOVE SOME F 

ORCES LEFT." 

12070 PRINT :PRINT " K","MOVE SOME F 

ORCES RIBHT." 

12080 PRINT !PRINT " M","MOVE SOME F 

ORCES DOWN. " 

12090 PRINT iPRINT " S", "SURRENDER T 

OTHER SIDE." 

12100 PRINT iPRINT iPRINT " <HIT ANY 

KEY TO RETURN TO SftME)"| 

12110 BET 12, X 

12120 RETURN 

Move cursor and forces, and update 
screen display. 



13000 SF(CC+PL»NC,CRI=SF(CCtPL«NC, GRI- 
NS 

13010 BC$=SP$iCOL=CC!R0N=CRiBOSUB 30 
13020 CC=CC+DCi CC=CC+ (CC<0) - (COMCl 
13030 CR=CR+DR!CR=CR+(CR<0)-(CR>NR) 
13040 FS=SF(CC+PL»NC,CR):IF FS+NB>99 T 
HEN SF(COL+PL»NC,ROW)=SFIC0L+PL»NC,RO« 
)+N6-(99-FS)iNB=99-FS!60SUB 30 
13050 SF(CC+PL«NC,CR)=FS+NE 
130i0 IF CC=COL AND CR=RON THEN NS=0 
13070 BC$=CU$!C0L=CCiR0N=CR!60SUB 30 
13080 MA(PL)::Mfl(PL)-N6!S0SUB 11000 
13090 POSITION DC(PL),ARiPRINT MAIPDj 

13120 RETURN 




S-80 VERSION 

10 GOTO 60 

Subroutine to print contents of position (COL, ROW) to screen. 

20 CP=CP(COL,ROW)i PRINTS PAy.(COL,ROW),BCSi P$(CP)ii NB=SF(BL,CO 

L,ROIil)i NH=SF(WH,COL,RO«)! SF=NB+NW! IF SF(1-CP,C0L,R0W)=0 THEN 

30 

25 PRINT CHR$(NB/SF«25+65)i CHR<(NW/SF«25+65)i! GOTO 35 

30 PRINT RIfiHrt(STR«(SF),2)i 

35 PRINT P$(CP); BC«|i RETURN 

Main prograii control routine. 

60 CLEAR 200 

65 Bt=CHR$(138)! N«="-" 

70 NC=8i NR=I0 

80 6DSUB 1000 

90 GOSUB 2000 

100 GOSUB 3000 

110 GOSUB AOOO 

120 GOSUB 5000 

130 GOSUB 6000 

140 GOSUB 7000 

150 GOTO 8000 

160 CLS: END 

Print instructions. 

1000 CLS 

1010 PRINT "BATTLEFIELD! A TERRITORIAL GAME BY J 

OE HUMPHREY" 



1020 PRINT TAB(15) "(S-BO TRANSLATION BY JON VOSKUID"; PRINT 
1040 PRINT" TWO PLAYERS CONTROL FORCES ON A";NCrBY";NR; "PLAY 
INS FIELD." 

1050 PRINT"SQUARES OWNED BY ONE SIDE ARE SHOWN WITH THE NUMBER G 
F FORCES", "BETWEEN VERTICAL BARS ("iCHRt(13B)r "|CHR»(138) j"!; 

SQUARES OWNED BY THE OTHER SIDE" 

1060 PRINT'ARE SHOWN WITH THE NUMBER OF FORCES BETWEEN HYPHENS '■ 
- -)."," SQUARES CONTAINING FORCES OF BOTH SIDES ARE SHOWN W 
ITH" 
1070 PRINT'lETTERS REPRESENTING THE RELATIVE FORCE SIZES; AT THE 

END OF", "EACH TURN, BATTLES ARE FOUGHT IN THESE SQUARES TO DETE 
RNINE" 

1080 PRINT"WHO OWNS THEM, THE FIRST PLAYER TO OWN ALL THE SQUAR 
ES WINS." 

1090 PRINT" AT THE BEGINNING OF EACH ROUND, NEW FORCES ARE AD 
DEO TO EACHSIDE, AND EACH SIDE'S MOVEMENT ALLOWANCE IS INCREASED 

H 

1110 RETURN 

Initialize variables. 

2000 BL=0! WH=1 

2010 F=0! T=l 

2020 HC=NC-l! MR=NR-1 

2025 DIM PA7.(MC,«R)! FOR COL=0 TO MCi FOR ROW=0 TO MR: PAX(C0L,R 

0W)= R0W»64 + C0H6 + (10-NC)«3 +l! NEXT: NEXT 

2030 DIM DC(1),EC(1),LC(1),PC(1) 

2040 DIM MA(1),MF(1),NS(I),PN$(1),TF(1) 

2050 DIM CP(NC,nR),SF(l,MC,MR) 

2060 LC(BL)=l! DC(BL)=16! EC(BL)=21 

2070 LC(WH)=LC(BLi+20i DC(MHI=DC(BL)+20! EC(«H)=EC(BL)+19 

2080 FR=B3?! SR=S55i AR=914 

2090 BS$=CHR$(8) 

2100 SP<=" ": CU«="I" 



48 



SoftSide August 1981 




2110 DIM P«(l): P$(BL)="-"! P$(UH)=CHR$(138) 

2120 HC=INT(NC/21 

2130 FOR ROW=0 TO HRi FOR C0L=O TO HC-ls CP(COL,ROW)=BL! NEXT; F 

OR COL=HC TO MC; CP(COL,ROWI=«H: NEXT: NEXT 

2170 NS(BL)=NR«HC! NS(WH)=NR«NC-NS(BLI 

2190 RETURN 

Input players' names. 

3000 PRINT 8900, "PLAYER I'S NftflE: "i! INPUT PN« 

3010 IF PN$="" THEN 3000 

3020 IF LEN(PN$)>10 THEN PN$=LEFT$(PN«, 10) 

3025 PN$(BL)=PN«: PN$="" 

3030 PRINT S900, STRING<i63,32) |! PRINT i900, "PLAYER 2'S NAME: 

"j: INPUT PN$ 

3040 IF PN*="" THEN 3030 

3050 IF LEN(PN$)>I0 THEN PN«=LEFT$(PN<,10) 

3055 PN«(«H)=PNt 

3060 RETURN 

DrsM playing field and display player data. 



GOSUB 20: NEXT: NEXT 
FOR 1=0 TO 128 STEP 44: PRINT 



4000 BC»=SP$ 

4010 CLS 

4020 FOR RC«=0 TO MR: FOR COL=0 TO MC 

4050 PRINTS 704, STRING$(64, 176) 

3 799+1, CHR«(149)|i NEXT I 

4060 FOR IPL=BL TO HH: PC=IPL»32 

4065 L=14-INT{LEN(PNJ(IPL))/2) 

4070 PRINT3 769+PC, STRINGJ(L,95)| PNtdPDj STRING»(L,95) 

4030 PRINT3 332+PC, "FORCES: SQUARES:"; 

4090 PRINTS 900+PC, "MOVEMENT LEFT:'; 

4100 PRINTS FR+PC, TF(IPL); 

4110 PRINTS SR+PC, NS(IPL); 

4120 PRINTS AR+PC, NA(IPL)) 

4130 NEXT IPL; RETURN 

Begin black's turn. Add forces and increase Moveiient 
AlloHances. 

5000 BC$=SP» 

5010 FOR IPL=BL TO WH 

5020 MF(IPL1=INT(NS(IPL)/NR)+1 

5030 NEXT IPL 

5040 FOR ROW=0 TO MR: FOR CGL=0 TO MC STEP MC 

5050 CP=CP(COL,ROW): SF=SF(CP,COL,ROH) 

5060 NF=MF(CP): IF SF+NF>99 THEN NF=99-SF 

5070 IF NF>0 THEN SF(CP,COL,ROW)=SF+NF: GOSUB 20 

5080 TF(CP)=TF(CP)+NF: MA(CP)=Mfl(CP)+MF(CP) 

5090 NEXT COL, ROM 

5100 FOR IPL=BL TO «H 

5110 PRINTS FR+IPLt32, TFdPDi" "| 



5120 PRINTS ARtIPL«32, Mfl(IPL);" "; 
5130 NEXT IPLi PL=BL: CC=0 
5140 RETURN 

Execute player's aoves until done or until Movement Allowance is 
depleted. 

6000 CR=INT(NR/2) 

6010 NG=0 

6020 PF=F 

6030 GOSUB 14000 

6040 BCt=CU(: COL°CC: RDN=CR: 60SUB 20 

60S0 GOSUB 11000 

6060 MG=SF(PL,CC,CR) 

6070 IF MA(PL)=0 THEN 6120 

6080 GOSUB 10000 

4090 IF CH«="H" THEN 6030 

6100 IF CH$=BS$ OR DF THEN 6050 

6110 IF CH$<>"E" AND CH$<>"S" THEN 6060 

6120 BC«=SP$: COL=CC: ROM=CR! GOSUB 20 

6130 NG=0:60SUB 11000 

6140 PRINTS 960, STRINS»(63,32)i 

6160 RETURN 

Fight battles to the death in disputed squares. 

7000 IF NS(PL)=0 THEN 7170 

7010 FOR ROM'O TO MRi FOR CGL=0 TO MC 

7020 CP«CP(COL,ROW): IF CP-PL OR SF(PL,COL,R0W)=O THEN 7160 

7030 NS(CP)«NS(CP)-1 

7040 NB'SF(BL,COL,ROW)i NM'SF(NH,COL,ROW) 

7050 IF NKONB THEN CPICOL,RO«)-(NN>NB) 

7040 IF NNHNB'O THEN 7130 

7070 SF»NB+N« 

7080 IF NB<SFtRND(0) THEN NB«NB-Ii TFIBD'TFIBD-l 

7090 IF NN<SF«RND(0) THEN Nt(«N«-li TFIWHl'TFIWH)-! 

7100 FOR ZP'BL TO NH; PRINTS FR+32IZP, TF(ZP);: NEXT ZP 

7110 SF(BL,COL,ROW)>NBi SF(MH,C0L,R0N1<NM 

7120 GOSUB 20i SOTO 7050 

7130 GOSUB 20 

7140 CP«CP(COL,ROW): NS(CP)«NS(CP)+1 

7150 FOR ZP'BL TO WHi PRINTS SR+32IZP, NS(ZP)|i NEXT ZP 

7140 NEXT) NEXT 

7170 RETURN 

End of turn) chick for end of gine. 

eOOO IF NS(BL)tNS(NH)>0 THEN 8100 
8020 WP«>PNI(BL): IF NSIBD'O THEN MP(>PNt(UH) 
802S FOR I»LEN(«PI)-1 TO 1 STEP -1: MP$«LEFT«(WP»,I1 + " " + RIG 
HTt(UPt,LEN(MP<)-I): NEXT I 

8030 FOR Z«l TO 30; PRINTS 960, STRING»(63,32)|: FOR ZZ=1 TO 10; 
NEXT ZZ 

continued on next page 



SoftSide August 1981 



49 



continued from previous page 

8040 PRINT8 960, HP*)" W I N S ! ! !"|i FOR ZZ=1 TO 15: NEXT Z 

Zi NEXT Z 

8050 PRINTa 990, "ANOTHER GflHE? (Y/N)'| 

BOio at'imnt if ch$="" then soio 

aOZO IF CHJ»"N" THEN 8130 

8090 GOTO iO 

8100 IF PL=«H THEN 120 

8110 PL=WH: CC=NC 

8120 GOTO 130 

8130 GOTO 160 



Input and execute a conmand. 



10000 

10030 
10040 
10050 
10060 
10070 
10080 
10090 
10100 
10110 
10120 
10130 
10140 
10150 
10160 



CH«=!NKEY«! IF CH«="" THEN 10000 

DF= (CH«>='0" m CH«(="9")! DC=0i DR=0 

IF DF AND NOT PF THEN NG=0 

PF=DF 

IF DF THEN NG=10«NG+VAL(CH«): GOTO 10160 

IF CH«=BS« THEN NG=INT(NG/10)! PF=l! GOTO 10160 

IF CH$="E" THEN 10160 

IF CH$="H" THEN GOSUB 12000: GOSUB 4000: GOTO 10160 

IF CH«="r THEN DR=-li GOTO 10150 

THEN DC=-l! GOTO 10150 

THEN DC=1: GOTO 10150 

THEN DR=1: GOTO 10150 
IF CH«="S" THEN NS(PL)=0: GOTO 10160 
GOSUB 13000 
RETURN 



IF CH»="J" 
IF CHJ="r 
IF CH$="H" 



Adjust the nu«ber o( forces being moved, and update the screen. 

11000 IF CP(CC,CRK>PL THEN NG=0 

11010 IF NG>HG THEN NG=Nj 

11020 IF NG;NA(PL) then N6=«A(PL) 

11030 TRINT! 982,; 

11040 IF NG=0 THEN PRINT "<TYPE H FOR HELP>"j! GOTO 11080 

11050 PRINT "<HOVlNG"iNG;"FORCE"j 

1106(1 IF NG;1 THEN PRINT "S"i 

11070 PRINT")"; 



11080 PRINT " "I 
11090 RETURN 

Print a list of coAiiands, in response to request for <H>elp. 

12000 CLS! PRINTS 64, "COHflAND:", "DESCRIPTION)' 

12005 PRINT STRING»(8,131),STRINGI(12,131) 

12010 PRINT: PRINT "A NUMBER", "THE NUMBER OF FORCES TO HOVE (E. 

8,, 23)." 

12020 PRINT • "|CHR$I93), "DELETE LAST DIGIT OF NUMBER." 

12030 PRINT" E", "END TURN. (TURN ALSO ENDS NHEN MOVEMENT",, 

" ALLOWANCE IS ZERO.)" 



12040 PRINT 
12050 PRINT 
12060 PRINT 
12070 PRINT 
12080 PRINT 
12090 PRINT 
12100 PRINT} 980, 
12110 CHMlNKEYti 



H", "PRINT THIS COMMAND LIST," 
I", "MOVE SOME FORCES UP." 
J", "MOVE SOME FORCES LEFT." 
K", "MOVE SOME FORCES RIGHT." 
M", "MOVE SOME FORCES DOWN." 
S", "SURRENDER TO THE OTHER SIDE." 

"(HIT ANY KEY TO RETURN TO GAME)" 

IF CHI="" THEN 12110 



12120 CH»="H": RETURN 

Move cursor and forces, and update the screen. 

13000 SF(PL,CC,CR)=SF(PL,CC,CR)-N6 

13010 BC$=SP»: COL=CC: ROH=CR: GOSUB 20 

13020 CC=CC+DC; CC=CC-ICC<0)+(CC>MC) 

13030 CR=CR+DRi CR=CR-(CR<0)+(CR>NR) 

13040 FS=SF(PL,CC,CR): IF FS+NG>99 THEN SF(PL,COL,ROW)=SF(PL,COL 

,R0«)+NG-(99-FS); NG=99-FS! GOSUB 20 

13050 SF(PL,CC,CR)=FS+NG 

13060 IF CC=COL AND CR=ROW THEN NG=0 

13070 BC»=CU«: COL=CC: ROW=CR: GOSUB 20 

13080 l1A{PLl=MfiiPL)-NGi GOSUB 11000 

13100 PRINTS AR+PH32, NA(PL); 

13120 RETURN 

Routine to flash a player's naiie, 



14000 PRINTS 960, STRING$(63,32); 

14010 FOR Z=l TO 4: PRINTS 960+45«PL, STRING«(18,32); 

14020 FOR ZZ=1 TO 15: NEXT ZZ 

14030 PRINTS 960+45«PL, PNt(PL);"'S TURN"; 

14040 FOR ZZ=1 TO 20: NEXT ZZ 

14050 NEXT Z: RETURN 



© 




50 



SoftSide August 1981 




PRO-PIX '81 

By Talley-Ho Software 

TRS-80TAPEModel1&3 
TRS-80 DISK Model 1 



0100127 $19.95 
012-0127 $24.95 



ALSO AVAILABLE FOR 
APPLE TAPE TO DISK 041-0127 $19.95 

ATARI 400/800 TAPE TO DISK 051-0127 $19.95 



PROPIX '81 

By Talley-Ho Software 



PRO-FOOTBALL-PIX, or PRO-PIX, Is ttie culmina- 
tion of over five years of development and use of a 
utility program to track the progress of the 28 pro- 
fessional U. S. football teams during the regular 
224-game (16 weel<s and 14 games per week) 
season. PRO-PIX made its public debut in 1980 
under a slightly different name after extensive 
testing and was very successful, receiving many 
plaudits from users, and requests for a 1981 ver- 
sion. PRO-PIX Is basically an updated version for 
1981, with several subtle changes in presentation 
format. The prediction data has been modified 
slightly and information is included herein for up- 
dating the program for successive seasons. 
PRO-PIX is designed for use on APPLE II PLUS or 
APPLE II, or ATARI 400/800 computers with at 
least 32K of memory. It will operate with data- 
handling to either Disk or Tape. 

Features of PRO-PIX may be summarized as 
follows: 

• List SCHEDULES by team or week of in- 
terest. 

• List SCORES of all games played, by team 
or week. 

• List current STANDINGS in division. 

• Show PREDICTIONS for games to be 
played, by team or week. 

• PRINT any screen that displays data. 

• UPDATE the program by entering weekly 
scores. 

• Set up a new SEASON. 



ADVENTURE 11 & 12 ARE HERE! 

CALL OUR TOLL-FREE NUMBER FOR ORDERING INFORMATION! 



INTERACTIVE FICTION 



BY ROBERT LaFORE 

FOURTH IN THE SERIES 
HIS MAJESTY'S SHIP "IMPETUOUS" 

WHAT IS IT? 

Interactive Fiction is story-telling using a com- 
puter, so that you, the reader, can actually take 
part in the story instead of merely reading. 

HOW DOES IT WORK? 

The computer sets the scene with a fictional situa- 
tion, which you can read from the CRT. Then, you 
become a character in the story: when it's your 
turn to speak you type in your response. The 
dialogue of the other characters and even the plot 
will depend on what you say. 

IS IT A GAME? 

No. In a game the situation Is rigidly defined and 
you can select from only a limited number of 
responses. But in Interactive Fiction you can say 
anything you like to the other characters.(Of 
course if your response is too bizarre they may not 
understand you.) 

His Majesty's Ship "Impetuous" — You are the 

Captain, Horatio Hornblower, back in the days 
when His Majesty's Navy ruled the seven seas. 
Pirates, plunder, fame and fortune await the in- 
trepid captain. If you have ever enjoyed books 
about the sea, now is your chance to take the helm 
and find out what this life was really like. 





Compu-Sketch 



by Roger W. Robitaille, Sr. 

"Compu-Sketch" is an S-80 
graphics program requiring 16K of 
memory. 

"Compu-Sketch" is a nifty little 
program that will transform anybody 
into a computer artist. The screen 
becomes your canvas, the keyboard 
your brush. And after you complete 
your masterpiece, you can 
electronically store and preserve it for 
the world to see. 

This program was designed to be 
simple to use, and provides plenty of 
prompting to the user through the use 
of menus and menu-Hke dislays. The 
first menu you will encounter allows 
you to choose from the five major 
parts of the program: the Draw 
routine, which is explained in detail 
below; the Image Save and Image Read 
routines, which will move a memory 
full of designs to and from either 
cassette or disk; a printer output 
routine which will print your artwork 
on your graphic printer; and a routine 
that allows you to review, delete and 
modify any of the images in memory. 

The draw mode is where most of the 
interaction with the program takes 
place, and this is where the actual 
drawing is done. You will be presented 
with a list of options at the bottom of 
the screen, and a flashing cursor in the 
middle of the screen. Imagine this 
point as being the tip of your 
paintbrush, which you will move, pick 
up, and set down to draw. 

On the bottom right of the screen are 
two displays which give you some 
important information. REPT tells 
you whether the automatic repeat is on 
or off. When it is on, depressing one of 
the arrow keys will cause the cursor to 
continue to move until it is released. 
When it is off, a keystroke is needed 
for every space which the dot is to 
move. The other message here is 
FUNC, which tells you what function 
the program is in: MOVE means that 
movement of the cursor will not alter 
the screen display, SET signifies that 
moving the cursor will leave a line of 
points, and RESET will cause the 
cursor to continually erase wherever it 
moves. One last function, TYPE, tells 
the computer to display all keyboard 
input on the graphics screen instead of 
interpreting it as a command. Hit the 
52 



CLEAR key to exit this mode and 
return to MOVE. 

Another important display is 
CURSOR. Within each double-wide 
graphics block, there are three 
positions which can be separately 
accessed. The CURSOR display shows 
which of those three vertically-stacked 
positions is currently being addressed. 

The legal commands while in the 
Draw routine are: 

G: Turns the automatic repeat on or 
off. 

F: Allows you to change the function 
(SET, RESET, MOVE or TYPE). 
I: Allows you to save the current image 
in memory. 

S: Sets (turns on) the point at the 
current cursor location. 
R: Resets (turns off) the point at the 
current cursor location. 
C: Allows you to enter a single 
character on the screen by typing either 
the character or the character's ASCII 
value. (Illegal values will be ignored.) 
M: Returns you to the main menu at 
the start of the program, leaving all 
stored images intact. Remember to 
store the image on the screen before 
doing this, or it will be lost. 
The arrow keys: Used to move the 
cursor around the screen in the desired 
direction. 



PROGRAMMER'S NOTES 

Softside's original S-80 screen 
drawing program was pubhshed in its 
fourth issue (January 1979). It required 
less than IK of code and did a very 
creditable job for its time. It was 
structured around SET/RESET 
graphics. One of its main drawbacks 
was linked to the nature of the S-80 
graphics themselves. A single pixel (the 
smallest possible graphics element) is 
not as wide as it is tall; in fact, it's just 
about twice as tall as it is wide. Lines 
that are a single pixel wide appear twice 
as thick when drawn across as when 
drawn down. It made for some 
awkward-looking drawings, to be sure. 

The solution was to devise a method 
to support a cursor that was two pixels 
wide by one pixel tall. This approach 
produces a nearly equal vertical versus 
horizontal line thickness. This simple 
concept, however, has some rather 

SoftSide August 1981 



complicated consequences. Let me 
explain. 

The principles of the 64 graphics 
characters supported by the S-80 have 
been explained again and again in 
SoftSide and elsewhere. There are six 
pixels that occupy the same area of the 
screen that would otherwise be a letter. 
Since this program uses them in 
horizontal pairs, there are only three of 
the new double pixels in that same 
area. And, whereas the six normal 
rectangular pixels can be arranged in 
64 combinations, this program uses 
only eight of them: Graphic 128 (all 
off), 131 (upper two on), 140 (middle 
two on), 143 (upper and middle pairs 
on), 179 (lower pair on), 188 (middle 
and lower pairs on), and 191 (all on). 

Much of the logic of this program is 
based on knowing that adding or 
subtracting the proper offset values 
will result in turning on or off the 
proper pixel pair. The top pair can be 
turned on or off by adding or 
subracting the value 3, the middle pair 
12, and the bottom pair 48. There is 
more to it of course, and the extensive 
comments spliced into the program 
provide further documentation. 



VARIABLES 

A: Used to position VARPTR of A$ 

in screen storage routine (lines 

700-710). 

A$: Used to take data from screen 

into array P$. (See also A). 

AX$: Current function (S = Set, 

R = Reset, M = Move, T = Type). 

AYS: Repeat (Y = Yes, N = No). 

C$: Code to be printed to printer to 

cause either condensed or normal 

printing. 

CU: Current cursor position. 

CU$: Current cursor character. 

E: Character present at cursor 

position. 

I, J: Miscellaneous loops. 

IM: Image number. 

MD: Current mode, based on Y 

position of current pixel within 

current cursor position. 

N: Maximum number of frames. 

P$(x,y): Image storage array. 

Q, QQ, Q$, QQ$: Miscellaneous 

user input. 



Clears an aiount of letory for strings based on the aiount of 
free neiory in the lachine. Then-calculates the maxiiiuii nunber 
of iiages there is rooi to store (N) and reserves array space 
for these iiages tP$). Also defines all variables starting Mith 
a letter from D to K as integers to speed up execution tine. 

100 CLS!CLEAR50iCLEAR(MEN>.B)!N=FRE(A»)/900:DEFlNTD-KiDIHP$(12,N 



Initialization of so«e isportant variables, including the naaes 
of the i«ages in storage. 

105 FORI=lTON!P<(0,n="UNUSED":NEXTl 

110 A1(«="I1':AY$="N":CU=415!CU»=CHR$(1'I0)!I1D=2!E=128 

The lain lenu of the prograi. A selection is accepted, acted 
upon, then line 122 returns to the menu. Use the dotin-arrot) key 
to align the lenu in the foriat shoNn. 

120 CLSiPRINT}20,"HENU 
DRAH NODE 1 
DISK SAVE 2 
DISK READ 3 
PRINTER OUTPUT 4 
IHABE REVIEW 5 

''!lNPUT"SELECTI0N"iQ!CLS!0NQ60SUB';90, 300, 350, 5300, 900 
122 B0T0120 

This is a prograi developient "Can't ness up ny file naie 
between saves' prograiiing hint. Just type E0TO199 to save the 
prograi (disk users only), When eiploying this technique, be 
certain that the prograi doesn't stuible across the line by 
listake (note line 122 which prevents this for occurring.) 

199 SAVE "GRAPHIC/BAS'sSTOP 

Figure out what graphic character needs to be "set" on the 
video. 

200 IFE<129THENE=ASC(CU«)!RETURHELSEY=ASC(CU<)ilF(Y=E)+(E=191)TH 
ENRETURN 

201 IF((Y=131)»(E=1AO))+(1Y=140)«(E=131))THEKE=143!RETURN 

202 IF((Y=131)I(E=176)) + ((Y=17())«(E=131))THENE=179!RETURN 

203 IF((Y=131)IIE=lB8))+((Y=140)t(E=179))+(IY=176)«(E=143))TH£NE 
=19l!RETURN 

204 IF{(Y=140)t(E=176))+((Y=176U(E=140))THENE=18B!RETURN 

205 RETURN 

Logic for the reset option in the draii node. 

210 IFE<129THENE=128!RETURNELSEY=ASClCU»l!lFY=ETHENE=12B!RETURN 

211 IF(y=131)«((E=140)+IE=176)+(E=188))THENRETURN 

212 IF(y=140)«((E=131)+(E=17t)+(E=179))THENRETURN 

213 IF(Y=17b)»((E=131)t(E=140)+(E=143))THENRETURN 

214 IFY=!31THENE=E-3£LSEIFY=140THENE=E-12ELSEIFY=176THENE=E-48 

215 RETURN 

Start of save-data routine. 

300 PRINT8832,ii INPUT "DISK OR TAPE"iQ$:Q«=LEFT$(Q$,I) :IF Q$="D" 
THENPRINTJ89i,"WHAT IS THE FILE NAME TO BE STORED" pELSEPRINTJB? 
6, "HIT ENTER WHEN TAPE IS READY TO SAVE"| 

Uhen Morking with disk files, proper procedure says to close all 
files before opening any new ones. Then "0" specifies output 
and the 1 specifies buffer 1. S9$ is the naie of the disk file. 

310 INPUTQQ»!lF D«="D" THEN CLOSE: 0PEN"0",1,QQ$ 



Store the data. If saving to tape, the string "END OF DATA" is 
printed at the end of the tape so the "read" routine will know 
Hhen it is done. 

320 F0RII1=1T0N:F0RI=0T012 

325 IFP»(0,II1) = "UNUSED"THENI = 12!NEni,It1;IFQt="D"THENCL0SE;RETUR 

NELSEPRINT»-1,CHR$(34)|"END OF DATA"|CHR$(34)!RETURN 

330 IF Q$="D" THEN PRINTItl,CHR$(34);P»(I,IM)|CHR»(34)!NEni,II1:C 

LOSE! RETURN 

332 PRINT»-l,CHR$(34))P»(I,II1)jCHR$(34);NEXTI,II1:PRINT#-l,CHRt(3 

4); "END OF DATA" ;CHR$ (34) : RETURN 

Beginning of read-data routine, 

350 PRINT30,CHR$(31)|!lNPUT "DISK OR TAPE'jQ«!Q$=LEFT«(Qt,l) ;IFQ 
«="D"THENPRINT80,"WHAT IS THE FILE NAME TO BE RECALLED";iELSEPRI 
NT50,"HIT ENTER WHEN TAPE IS READY TO LOAD") 

If disk, then open the previously created file for input ("I") 
using buffer 1. 

360 INPUT 8Q»!PRINTJ64,STR!N6« (64, "-"> ! IH=liI=Oi IFQ$="D"THENCLDS 
E!OPEN"r',l,QQ$ 

Input for disk. EOF(l) is true when the End Of File il has been 
reached, signifying there is no lore data to be read. 

370 IF Q$="D" THEN IFE0F(UTH£NRETURN:ELSEINPUT«l,P$(I,IH)iS0T03 
74 

Input for cassette. Each string inputted is coipared to "END OF 
DATA" to check for the end of data stored on the tape. 

372 INPUTI-l,P$(I,II1)!lF P«(I,in)="END OF DATA" THEN P»(I,1H)="U 
NUSED"! RETURN 

Display the inputted data on the screen, then continue 
inputting. 

374 PRINT3128+I»64,CHR»l31)jP$(I,IN)iiI=Itl!lFI=13THENI=0!l«=IN+ 

I 

376 GOTO 370 

Draw a line of hyphens to seperate the graphic design on the 
upper part of the screen froi the list of options at the bottoi, 
which are printed by the subroutine at line 600. 

490 PRINT3768,STRING$(64,"-")|!G0SUB600 

This is the point where lost input from the keyboard will be 



Sketch 



SEPEfiT . ON/OFF) S = SET CURSOR C = SET Cm FUtK m-ii 

■.''v:':dh select p = reset cursor cursor k pepmnc_ 

"' " !£['■]= CONTROLS H = NfilN MEMy 



continued on next page 



SoftSide August 1981 



53 



continued from previous page 

tide. i% stores any new strike on the keyboard. The 
PEEK(1A400) statenents are checking if any ot the arrow keys are 
being held dottn. If they are, they are converted to the proper 
ASCII codes and put into S( for later interpretation. 

580 PRINT8Cli,CU« j iQ$=INi;EY»! IF Q$=" "ftNDAU< >"T"ANDAYt="Y"THENIF { 
PEEK(14400)ANDB)THEND«=CHR»(91)ELSEIFIPEEK(14«0)ftND16)THENfl»=CH 
R»(10)ELSEIFiPEEK(14400)»ND32)THENQ>=CHR»(B)ELSEIFIPEEK(MA00)AN 
DM)THENQ«=CHR«(91 

503 POKE 15360+CU,EiIF Q«="" THEN 500 

504 IFA)($="T"THENIFQ$=CHR$(311THENA)($="M":GQSUB610:ELSEIFQ$<>CHR 
$ ( 10) ANDB»< >CHR« (9) ANDQ$< >CHR$ (8) ANDQ»<>' [ "THENPRINT8CU, Q» j i E=ft5 
CIQ)):EI4^HR$(9) 

Checks if the up arroN key Mas pushed. If so, move the cursor 
up one graphic rox and check for screen roll-over. Note that 
■oving up on the screen is done by decreasing the y coordinate. 

505 IFB«="["THENI1D=ND-l!S0SUB590 

Check if the dottn arroM Mas depressed. If so, sove the cursor 
doMn one graphic roM and check for screen roll-over. Note that 
■oving doMn on the screen is done by increasing the y 
coordinate. 




507 IFQ$=CHR$ (10) THEN(1D=ND+1 ! G0SUB590 

If the left arroH has been pushed, and the cursor is not at the 
upper-left of the screen (Cli=0), love the cursor one space to 
the left, 

510 IF(fl»=CHR»(B))<iCU>01THENCU=CU-l!E=PEEK(15360tCU) 

Saie as above, except for the right arroM and the cursor at the 
lOMer-right of the screen (CU=767). 

515 IF(Q»=CHR»(9))»(CU<7i7)THENCU=CU+l!E=PEEK(15360+CU) 

If the Set coiiand Has given (B$="S") or we are in the automatic 
set function (AIt="S") then go to the setting routine. 

520 IF(Q$="S") + ((ft)l$="S")«(ID»="[") + (Q»=CHR$(8)) + IQ$=CHR»(9)) + IQ 
»=CHR»( 10) ) ) ) THENB0SUB200! P0KE15360+CU, E 

Saie as above, but for the Reset comand (Q$="R") and reset 
function {AX»="R") 

525 IF(Q$="R") + ((A)(»="R")t(lQ*="[") + (B»=CHR$(8)) + (Q$=CHR»(9)) + iD 
»=CHR$(10))))THENG0SUB210;P0KE153i0+CU,E 



If the Repeat CMiand is given, toggle the repeat flag (AY$) to 
either Y or N and display the change on the screen (GQSUB bOOK 

530 IFI}l="G"THENIFAY»="N"THENAY«="Y"!SOSliB600:ELSEAY$="N"!B0Sl)B6 
00 

If the Function comand is given, input the nett faction (AKO 
and display the change on the screen (GOSUB &00). 

535 IFQ$="F"THENPRINTJ832,CHR$(31)i!PRINTJB96,"FllN£TI0Ni-> SET 
= S, RESET = R, MOVE = N, TYPE = T";!lNPUTAX»iG0SUB600 

Call the screen I/O subroutine if "I* has been pressed, 

540 IFQ»="I"THEN60SUB490 

If i keyboard character is desired rather than a graphic 
character, alloM it to be inputted. This also alloHS the 
display of characters not on the keyboard (such as the arrow 
keys and the underscore). 

545 IFQ$="C"TH£N60SUB650 

If requested CM" is typed), return to the «ain lenu. 




550 IFQ$="I1"THEMRETURN 

Return to the option input routine. 

580 GOTD500 

Logic to cover situations where the cursor actually crosses 
screen lines (MD = or 4). The cursor position is adjusted 
with consideration for screen wrap-around. 

590 PRlNTJCU,CHR»lE)|!lF(HD=0)»(CU>t3)THENHD=3iCU=CU-64iELSEIF(l1 
D=4)»(CU<703)THENI1D=l!CU=CU+64!ELSEIFlCU<64)HHD=0)THENCU=704+CU 
!HD=3ELSEIF((1D=4)l(CU>704)THENhD=l:CU=CU-704 

591 E=PEEK(15360tCU) 

Define the proper cursor according to the the node (HD), 

595 IF(1D=lTHENCU»=CHR$(131)ELSEIFHD=2THENCUt=CHR»(140)ELSEIFI1D=3 
THENCU$=CHRJ(176) 

596 PRINT}941,CU»|!RETURN 

This subroutine sets up the list of possible options at the 
bottoii of the screen. 

600 PRINT8832,CHR»(31)|:PRINT8832,"G = REPEAT (QN/OFF) 



54 



SoftSide August 1981 



F = FUNCTION SELECT 

I = SAVE/SHOW II1fl8£"i!PRINT8852,"S = SET CURSOR" i!PRINT8916,"R = 
RESET CURSOR"! 

i02 PRINTS980,"[";CHR$l94)iCHR$!92);CHR»(93)i"= CONTROLS"; :PRINT 
J933, "CURSOR "iCHR$(191)iCUt! 

605 PRINT8B69,"C = SET CHftR."i!PRINTJ997,"N = MAIN HENU"i 
610 PRINT98B3,CHR»(M9)i"FUNC >"|iIF flX$='T"THENPRINT"TVPE 'pEL 
SEIFA)1»="S"THENPRINT"SET "i!ELSEIFAl(J="R"THENPRINT"RESET"i!ELSE 
PRINT"I10VE "I 

615 PRINT8947,CHR$(149)i"REPT >"jiIF AY»="Y" THEN PRINT"yES"i!EL 
SEPRINT'NO "; 

618 PRINT31011,STRINS$(11,131)! 
620 RETURN 

Subroutine for single character input. Either the keyboard 
character, or the ASCII code of a character, lay be inputted and 
displayed. 

650 PRINT8832,CHR$l31)i:PRINT8896, "CHARACTER" J !lNPUTQ$i IF LEN(Q$ 
)>1 THEN IF VAHQt)<32 THEN Q$=LEFT«IQ$,1)! ELSE Q=VAL(Q$)!lF Q< 
'128 OR g'131 OR Q::i40 OR Q=1A3 OR QM76 OR Q=18S OR B=191 OR Q= 
179 THEN B(>CHR«ig)!ELSE 6S0 
652 GOSUB600! PRlNT8CU,0»i ! E=PEEK ( 15360+CU) ; RETURN 

This routine searches the stored iiage array for the first 
available location. 





^^^^_ 


,,,X>.i(XW«'<XX> 


[xxxxxxx ■ ^^» xxxy 

1 yy- 1 


f- 


ItjT "^^ 1 


1 




;■ = "JZf-' ON. OFF ^ S = SET CURSOR C = SET CHfll! FUNC >'>?£ 
■ = -.NC-ION SELECT P = RESET CURSOR CURSOR L PEPl >vE: 
: = snVE SHOW imSE fx]: CONTROLS N = NfllN HENU "^^ 



680 F0RIH»lTONiIFP»ll,II1)«""THENRETURNELSENEnihiRETURN 

Inforis the user where the iiage will be stored, and accepts a 
naie for the iiage to be saved. If there is no root for 
additional storage, the user will be so inforied, 

690 G0SUB680:PRINT8832,CHR»(31)i!lFII1<=NTHENPRINTJ832,"THE NEU 
AVAILABLE IHAGE I IS"iIN!lNPUT"HHAT IS THE INABE TITLE (8 CHRS)" 
iB$:B»=LEFT$(B$,8);ELSElNPUT"THERE IS NO UNUSED IMAGE SPACE. HI 
T ENTER' ;e!80SUB600! RETURN 

Check all the other iiage labels and see if there is already an 
iiage by the saie naie. If so, the user is alerted and given 
the opportunity to either change the naie or authorize the new 
iiage to replace the old. 

695 FOR J=lT0NiIFP$(0,J)=B$THENPRINT8896,"NAHE ALREADY IN USE, < 
R> REPLACE, <N> NEM IMAGE NAME"|!lNPUTQQ$!lFQQ$="N"THENG0T0690EL 
SElM=JELSENEnj 
697 PM0,1M1=B« 

Scan video RAH and build the screen display into strings which 



are stored in the array P$, The prograi uses the VARiable 
PoinTeR function to tell BASIC that the string A$ resides in 
video leiory where the screen display is stored. 

700 A$="!F0RI=0T0n!PRINT8999,"LINE"iI+l; 

705 A=VARPTR(A$):P0KEA,64:P0KEA+l,(I-INT(I/4)»4)»64!P0KEA+2,60+I 

NT(I/4) 

710 PI(I+l,IM)=A»:NEl(Tl:60SUB600iRETURN 

Gives an index of all iiages in storage, and allows the user to 
delete or lodify requested iiages. 

900 CLS:MK$='fl X X ":PRINT826, "IMAGE INDEX" 

902 FOR I=lTON!PRINTUSlNBMK»iI,P$(0,I),:NEni 

904 PRINT8832,i!lNPUT"liHICH IMAGE » DO YOU «ISH TO VIEWjIN 

905 GOTO 2000 

906 PRINT8832,CHR$(31)i"D0 YOU HANT TO VIEW ANOTHER IMAGE (Y/N)" 
I ! INPUT B»iIF LEFT«(B$,1)="Y" THEN 900 

910 RETURN 

Display the chosen iiage and input what the user desires to do 
with it. 

2000 B»="";PRINT80,iiFORI=lT012:PRINTP$(I,I«li!NEUl!PRINTCHRJ(3 
l)i:PRINT8896, "PRESS <E> TO ERASE, <M> TO MODIFY, (ENTER) TO CON 
TINUE";:INPUTB«iIFB$="'THEN 906 




2005 IF a»='H" THEN 490 

2010 P$(0,IM)="UNUSED":FDRI=lTO12:P»tI,lM)="":NEXTI:G0T0 906 

Print an image to a printer. To do this requires a printer with 
the ability to print graphics, such as the Microline-80 or the 
HX-80. C$ is used to hold the codes needed to cause the printer 
to print in either norial or condensed print lode. If you are 
using an HX-80, be sure to have it switched to S-BO lode before 
printing. 

5800 PRINT: PRINT"CONDENSED REPORT - 1, NORMAL REPORT - 2, MENU - 
3"|!lNPUTBl!lF BlOl AND B102 THEN RETURN 
5802 C$="" 

5805 PRINT "ENTER TYPE OF PRINTER YOU HAVE: 
hICROLINE 80 1 
MX-BO 2 
OTHER 3 

SELECTION"!: INPUT Q 

5B10 1FB1=1THENIFQ=1TH£NC$=CHR$I29)!ELSEIFB=2THENC»=CHR»(15):ELS 

E1FQ=1THENC$=CHR$I30)ELSEIFB=2THENC$=CHR«(18> 

5B50 PRINT: 1NPUT"WHAT IMAGE KOULD YOU LIKE TO PRINT"!X 



6000 LPRINTC»:F0RI=0T012!LPRINTP$(I,X):NEXTI;RETURN 



9 



SoftSide August 1981 



55 




Ever wanted to do 

things to your TRS-80 that Radio Shack 
said couldn't be done? How about upper/lower 
case, reverse video, high-resolution graphics, a 
high-speed clock, audible keystrokes, an extra 
keyboard, and a real-time clock? Still not enough? 
How about using an 8-track as a mass storage device, 
making music, controlling a synthesiser, monitoring 
your data bus, and individual reverse characters? All 
these hardware modifications, plus lots more, are in 
The Custom TRS-80 and Other Mysteries, 
by Dennis Bathory Kitsz - the latest book 
from IJG Computer Services. 




section. 

In this you learn how 

to make BASIC programs auto-execute, 
reset the memory size, patch into the interpreter, 
test memory with machine-language, pack program 
lines with machine code, and generate sound effects. 
The Custom TRS-80 and Other Mysteries is more 
than 300 pages of practical information, and tested 
software, for $29.95. Order your copy now, and start 
turning your TRS-80 into a five-hundred-dollar 
supercomputer! #65-2380018 $29.95 



S= TS€:l-ini^sb€ 



6 South SI .Millord, NH 03055 (603)673-5144 
TOLL FREE OUT-OF-STATE 1-800-258-1790 



56 



SoftSide August 1981 





APL 



by Phelps Gates 



Now a high-level, scientific programming language for the home computer that doesn't cost $200 or $300. The power of 
this language Is In Its strong mathematical operations, especially with regard to matrices and vectors. Programs requiring 
matrix multiplication or other matrix problem solving that would require hours of programming time in BASIC are solved 
quickly and with minimal effort in APL. 

To aid in learning APL, lessons are included on the disk. Starting from the basics, you are brought step by step through 
the various programming techniques involved with APL. These lessons act as a tutor which will have you "talking APL" in 
no time. Also available Is the book, "APL: An Interactive Approach," which reinforces many of the examples given in the 
lessons and provides additional Insight Into APL programming. 

FEATURES 

APL-80 on disk contains the following features: )SAVE and )LOAD workspace on disk; )COPY other workspaces Into cur- 
rent ones; Return to DOS for directory or commands without losing your workspace; Send output to lineprinter; Five 
workspaces of lessons included; Sequential and random files; 15 digit precision; Monadic and dyadic transposition; Easy 
editing within FUNCTION lines; Latent expressions(FUNCT10N can "come up running" when loaded); Tracing of function 
execution; Real-time clock; User-control of random link; Workspace is 25587 bytes (in 48K machine); Arrays may have up to 
63 dimensions. 

COMMANDS APL-80 

APL-80 supports the following commands; Absolute value, add, and assign, branch, catenate, ceiling, chr$/asc, circular, 
combinational, comment, compress, deal, decode, divide, drop, encode, equal, expand, exponential, factorial, floor, for- 
mat, grade down, grade up, greater, greater/equal, index generator. Indexing, Index of, inter product, label, less, less/equal, 
logarithm, maximum, member, minimum, multiple, nand, negate, nor, not, not equal, or, outer product, peek, poke, quad, 
quote quad, random, ravel, reciprocal, reduction, reshape, residue, reverse, rotate, scan, shape, sign, system, subtract, 
take, transposition. 

SPECIFICATIONS 

Minimum system requirements: 32K disk system (&48K recommended) includes APL-80, Five workshapes of lessons, in- 
struction manual $39.95 on disk 

Reduced feature: 16K Level II tape version, no lessons. 

Transpositions, format, and. Inner product not Implemented. Reduced domain for some functions, 6 digit accuracy. 
$14.95 on cassette 

LIMITATIONS 

Due to the absence of the special APL character set on the TRS-80 , APL-80 uses shifted letters to represent the various APL characters. In addition to the Keyboard 
limitations, lamination, domino, and matrls Inverse are not Implemented but can be derived with user-defined functions. Multiple specifications must be split Into 
two statements unless the left-hand assignment Is to a quad. This also applies to Implied multiple specifications. Reduction and reshape (p) are not permitted for 
empty arguments; the argument of add/drop may not be scalar; empty Indices are not permitted. A quad (q) can't be typed In response to a quad (nor can the name 
of a function which Itself gets Input from a quad). Quote-quad (m) Is permitted. No more than 32 user functions can be defined In a single workspace and a function 
may not contain more than 255 lines. 

A comment (c) must occupy a separate line: a comment can't follow a function statement on the same line. 
In the tape version, arrays are limited to five (5) dimensions. 




Selections- 

For OrdBrm Only B03-0730585 








A 
Y0UIN'81&'82 

Attend the biggest public computer shows in the country. 
Each show has 100,000 square feet of display space fea- 
turing over 50 Million Dollars worth of software and hard- 
ware for business, industry government, education, home 
and personal use. 
You'll see computers costing $150 to $250,000 including 
mini and micro computers, software, graphics, data and word 
processing equipment, telecommunications, office machines, 
electronic typewriters, peripheral equipment, supplies and com- 
puter services. 

All the major names are there including; IBM, Wang, DEC, 
Xerox, Burroughs, Data General, Qantel, Nixdorf, NEC, Radio 
Shack, Heathkit, Apple, RCA, Vector Graphic, and Commo- 
dore Pet. Plus, computerized videogames, robots, com- 
puter art, electronic gadgetry and computer music to 
entertain, enthrall and educate kids, spouses and peo- 
ple who don't know a program from a memory disk. 
Don't miss the Coming Of The New Computers- 
Show Up For The Show that mixes business with 
pleasure. Admission is $5 for adults and $2 for chil- 
dren under 12 when accompanied by an adult. 






Tfcket Information 

Send $5 per person with the name of the show 
you will attend to National Computer Shows, 
824 Boylston Street. Chestnut Hill. Mass, 02167. 
Tel. 61 7 739 2000. Tickets can also be purchased 
at the show. 



rs tx- 
I s-sr 



CHICAGO 
McCormick Place 

SCHOESSLING HALL 
23rd & THE LfKKE 

THURS-SUN 
SEPT 10-13, 1981 

11 AM TO 7PM WEEKDAYS 
11 AM TO 6PM WEEKENDS 



— ^r^aac* i-FB-n . 

WASHINGTON, DC 
DC Armory/Starplex 

2001 E. CAPITAL ST. SE 

(ECAP. ST. EXIT OFF I 295 

-KENILWORTH FRWY) 

ACROSS FROM RFK 

STADIUM 

THURS-SUN 

SEPT 24-27, 1981 

11 AM TO 7PM WEEKDAYS 

11 AM TO 6PM WEEKENDS 



BOSTON 
Hynes Auditorium 

PRUDENTIAL CENTER 

THURS-SUN 

OCT 15-18, 1981 

11 AM TO 7PM WEEKDAYS 
11 AM TO 6PM WEEKENDS 



THE 

SDUTHERST 

COHFUTER 

SHOW 

ATLANTA 
Atlanta Civic Center 

395 PIEDMONT AVE NE AT 
RALPH McGILL BLVD 

THURS-SUN 
CX;T294«DV 1,1981 

11 AM TO 7PM WEEKDAYS 
11 AM TO 6PM WEEKENDS 



THE 

SOUTTiERN 

-CRUFORNIR- 

COMRJTER 

SHOW 

LOS ANGELES 
LA Convention Center 

1201 SOUTH FIGUEROA 

THURS-SUN 

MAY e-9, 1982 

11 AM TO 7PM WEEKDAYS 
11 AM TO 6PM WEEKENDS 



58 




Shark 



by Mark Cross 

"Shark" is a Hi-Res graphics game 
requiring Applesoft and 16K RAM. 

If you need a break from shooting 
down assorted space vessels and in- 
vading aliens, this is just the program 
for you. It's a game of pursuit in which 
(for a change) you are the pursuer. 
With your game paddle or keyboard 
you control a 2000 pound aquatic 
eating machine which just loves all the 
little fish that are swimming around on 
your video screen. 

The most satisfying thing about 
"Shark" is that the other fish can't do 
a thing to get back at you. For once, 
you're the bully on the block, and you 
can wipe out all the little guys with no 
threat of revenge! You do have a time 
limit, and at the higher difficulty levels 
it's quite a challenge to finish your sup- 
per before the end of the game. 

At the beginning of the game you 
choose not only your skill level 
through 9, but also whether you 
want to use Paddle or the keyboard 
to maneuver the shark. The two types 
of control require different types of 
skill, and both are enjoyable. If you 
use the paddle, turning the knob will 



move you upward or downward as you 
swim from side to side, and pressing 
the button will reverse your direction. 
The keyboard, on the other hand, con- 
trols movement through the "U" 
and "D" keys for up-and-down move- 
ment, and the "T" for turning around. 
Pressing "U" or "D" repeatedly will 
change your angle of attack, so that 
you can achieve quite accurate control 
with some practice. 

Does this game have any socially 
redeeming value? Probably not. But 
it's sure a lot of fun. 

VARIABLES 

ZERO,WUN,TWO,THREE, 
FOUR,FIVE,SIX: Variables used in 
place of the corresponding constants. 
BOT: Bottom limit of fish motion 
(=157). 

DD: Distance at which small fish sees 
shark and begins to flee. 
DOWN: ASCII value of "D". 
I, II, J: Loop counters. 
KE: Keyboard buffer address 
( = -16384). 

KFLAG: Control flag; = 1 if 
keyboard control, = if paddle con- 
trol. 



KK$: Keyboard input character. 

NB: Number of small fish kft. 

RJ: Right screen limit. 

SB: Keyboard-clear address 

( = -16368). 

SKILL: Skill level. 

SW: Address of switch on Paddle 

( = -16287). 

T: Time. 

T1,T2: Set to 21 and 35; used in 

place of constants. 

TFLAG: Turn flag: direction of 

shark's movement, +1 or -1. 

TURN: ASCII value of "T". 

UP: ASCII value of "U". 

VB: Maximum speed of the small 

fish. 

VZ: Maximum speed of the shark. 

V,W,X,Y: Speed and position of the 

VB(*),WB(*),XB(*),YB(*): Speeds 

and positions of all surviving small 

fish. 

VV,WW,XX,YY: Temporary speed 

and position of small fish. 

SHAPES 
1: Shark facing right. 
2: Shark facing left. 
3: Small fish facing right. 
4: Small fish facing left. 

continued on next page 




SoftSide August 1981 



59 





440 IF KK < > UP THEN 460 




continued from previous page 


450 GOSUB 200! GOTO 500 


770 VV = VB I SGN (XX - X) 




460 IF KK = DOWN THEN GOSUB 250 


780 WW = VB 1 ( SGN (YY - Y) + lY 


10 GOTO 2000 




Y = Y)) 1 RND (WUN) / PP 




470 GOTO 500 


790 IF XX > = RJ THEN VV = - T 




480 IF PEEK (SW) > ^ MID THEN 


WO - VB « RND (WUN)! GOTO 8 


Subroutine to generate eating buzz. 


SOSUB 120 


10 




490 W = VZ » ( PDL (ZERO) - MID) / 


800 IF XX < = FIVE THEN VV = TW 


100 FOR J = 1 TO 40! JJ = PEEK ( 


MID 


t VB t RND (WUN): GOTO 83 



- 16336): NEXT J: RETURN 


500 XDRAW WUN + (V < ZERO) AT X, 




Y 
510 V = TFLAG t VZ 


810 IF YY > = BOT THEN WW = - 




TWO - VB » RND (WUN)! GOTO 
830 


Subroutine to print nuiber of fish 
left. 


520 X = X + V: IF X < FOUR THEN X 


= FOUR 


820 IF YY < = FIVE THEN WW = TW 




530 IF X > RJ THEN X = RJ 


MB t RND (WUN) 




540 Y = Y + W: IF Y < FIVE THEN Y 


830 XDRAW THREE + (VB(I) < ZERO) 
AT XX, YY 


110 VTAB 22! HTAB SIX: PRINT " " 


= FIVE 


i INT (NB - 1))" "j! RETURN 


550 IF Y > BOT THEN Y = BOT 


840 XO = XX + VVjYO = YY + WW 




560 XDRAW WUN + (V < ZERO) AT X, 


850 IF XO < FOUR THEN XO = FOUR 




Y 


860 IF XO > RJ THEN XO = RJ 


Subroutine to turn shark around. 




870 IF YO < TWO THEN YO = TWO 
880 IF YO > BOT THEN YO = BOT 




Check for caught fish. 


890 XDRAW THREE + (VV < ZERO) AT 


120 VTAB 24! HTAB WUN: PRINT "TU 


XO,YO 


RN 'i CHR* (7)i!TFLAG = - SGN 




900 VB(I) = VV:WB(I) = WW!XB(I) = 


(V) - (V = ZERO) 


570 FOR I = WUN TO NB 


XO:YB(I) = YO 


130 VTAB 24i HTAB WUN! PRINT " 


580 IF ABS (YB(I) - Y) > THREE THEN 


910 NEXT l! GOTO 400 


"i! RETURN 


600 
590 IF ABS (XB(I) - X) < SIX THEN 




Keyboard up-doHn routine. 


II = l!l = 999 
600 NEXT l! IF I < RJ THEN 670 
610 GOSUB 100! GOSUB 110 


End of gafie; play again? 


200 VTAB 24! HTAB h PRINT " UP 


620 XDRAW THREE + (VB(II) ( ZERO 
) AT XB(II),YB(II) 


1000 VTAB 23! HTAB 9! PRINT " 

GAME V E R": REM 


210 FOR J = 1 TO 10!JJ = PEEK ( 


630 IF II = NB THEN 660 

640 FOR J = II TO NB - WUN!Z9 = 


INSERT CTRL-G AFTER EACH 


- 16336)! NEXT J 


J + WUN 
650 XB(J) = XB(Z9)!YB(J) = YB(Z9) 


LETTER 


220 VTAB 24! HTAB l! PRINT " 


1010 VTAB 24: PRINT " PLAY AGAIN 


"jiW = N - 3! IF 




? "j! GET KK* 


U < - VZ THEN M = - VZ 


!VB(J) = VB(Z9)!WB(J) = WB(Z 
9)! NEXT J 
660 NB = NB - l! IF NB ( 1 THEN 1 
000 


1020 IF KK« = "Y" THEN TEXT : GOTO 


230 RETURN 

250 VTAB 24: HTAB li PRINT " DON 


2060 
1030 IF KK$ = "N" THEN VTAB 23! 


N";: FOR J = 1 TO 10!JJ = PEEK 


CALL - 958! END 


( - 16336): NEXT J 




1040 HTAB l! GOTO 1010 


260 FOR J = 1 TO 10: JJ = PEEK ( 


Move all the small fish, 




- 16336)! NEXT J 






270 VTAB 24! HTAB h PRINT " 




Title page, initialization, 


")!« = W + 3: IF ABS (M) > 


670 FOR I = WUN TO NB 


instructions. 


VZ THEN W = VZ 


680 XX = XB(I)!YY = YB(I)!VV = VB 




280 RETURN 


(I)!'WW = NB(I) 






690 IF KFLAG = ZERO THEN 740 


2000 TEXT ! HOME ! VTAB 7i PRINT 




700 IF PEEK (KE) < MID THEN 750 


TAB( 15)i"S H A R K" 


Move shark. 




2010 VTAB 15: PRINT TAB( W\'i 




710 KK = PEEK (KE)! POKE SB,0: IF 


Y MARK CROSS" 




KK = DOWN THEN GOSUB 250 


2020 GOSUB 7000 


400 T = T - NUN: VTAB Tl! HTAB TT 


720 IF KK = UP THEN GOSUB 200 


2030 KE = - 16384:88 = - 16368! 


! PRINT Tj" »ii IF T < WUN THEN 


730 IF KK = TURN THEN GOSUB 120 


TURN = 212!UP = 213!D0WN = 1 


1000 


735 GOTO 750 


96!SW = - 16287 


410 IF KFLAG = ZERO THEN 480 


740 IF PEEK (SW) > = MID THEN 


2040 DIM XB{20),YB(20),VB(201,WB 


420 KK = PEEK (KE)! POKE SB, ZERO 


GOSUB 120 


(20) 


! IF KK < HID THEN 500 


730 IF ABS (YY - Y) > DD THEN 7 


2050 FOR I = 1 TO 555: NEXT I 


430 IF KK = TURN THEN IF ABS ( 


90 


2060 HOME 


V) > T«0 THEN GOSUB 120: GOTO 


760 IF ABS (XX - X) > DD THEN 7 


2070 PRINT "I N S T R U C T I 


500 


90 


N S" 



60 



SoftSide August 1981 



2080 PRINT ; PRINT "YOU WILL CON 


2220 PRINT SKILL 


4010 TFLAG = SGN (V) 


TROL A SHARK WITH" 


2230 IF SKILL < OR SKILL > 9 THEN 


4020 XDRAW 1 + (V < 0) AT K,Y 


2090 PRINT "EITHER THE KEYBOARD 


PRINT "ERROR"; CHR$ (71: GOTO 




OR PADDLE ZERO." 


2190 




2100 PRINT : PRINT "YOU HAVE TD 




Print the player's score display. 


CATCH THE SMALL FISH": PRINT 






"BEFORE TIME RUNS OUT." 






2110 PRINT ! PRINT : PRINT "PADD 


Set up all the snail fish. 




LE CONTROL:": PRINT "TURN TH 




5000 HOME : VTAB 22: HTAB 6: PRINT 


E DIAL TO MOVE UP AND DOWN." 




" ")NBi" FISH LEFT"j 




3000 NB = INT (5 + (1 + SKILL) » 


5010 VTAB 21; HTAB 1: PRINT "SKI 


2120 PRINT "PRESS THE BUTTON TD 


RND (1)):VB = 4 + 11 + SKIL 


LL LEVEL = "iSKILLj" 


TURN AROUND. THE BUTT 


L) t RND (1) 


TIME = "i 


ON MAKES A BEEP." 


3010 VZ = 10 


5020 T = INT (215 - SKILL ♦ 10): 


2130 PRINT : PRINT "KEYBOARD CON 


3020 IF VB > = VZ - 1 THEN VB = 


VTAB 21: HTAB 35: PRINT T 


TROL: U = UP": HTAB 23 


VZ - 1 




: PRINT "D = DOWN": HTAB 2 


3030 HGR : POKE 28,127: CALL 624 




3: PRINT "T = TURN" 


54 


Initialize the variables which are 


2140 PRINT : PRINT : PRINT "PRES 


3040 SCALE= 1: ROT= 


used in place of constants. 


S P FOR PADDLE CONTROL": 


3050 FOR I = 1 TO NB:)(B(I) = 50 + 




PRINT " OR K FOR KEYB 


180 > RND (1):YB([) =3+1 




OARD CONTROL. "| 


40 1 RND (1) 




2150 POKE SB,0: BET KK$: POKE SB 
.0:KFLAG = (KK$ = "K") 


3060 VB(I) = 10 t RND (1) - 5:WB 
(I) = 10 t RND (1) - 5 


6000 DD = 18 + 3 » SKILL 


2160 PRINT CHR» (7)j" ";KK«: PRINT 


3070 Wm 3 + (VB(I) < 0) AT XB 
(I),YB(I) 


6010 ZERO = 0:WUN = 1:TW0 = 2!NID 
= 128:THREE = 3:F0UR = 4:FI 
VE = 5 
6020 TT = 35:LJ = 4:RJ = 275:B0T = 


2170 IF KK$ = "K" OR KK$ = "P" THEN 


3080 NEXT I 


2190 




157:SI)( = 6 


2180 PRINT : PRINT CHR$ (7);"ER 




6030 Tl = 21:Z3 = 273:Z4 = 16 


ROR": GOTO 2140 




6040 PP = (100 - 8 t SKILL) / 60 


2190 PRINT "WHAT SKILL LEVEL, 0- 


DraH the shark. 


6050 GOTO 400 


9? (9 IS HARD.)" 






2200 PRINT "PRESS THE NUMBER. 






"i: POKE SB,0: GET KK$: POKE 


4000 K = 40 + 200 1 RND (1):Y = 


Poke shape table into laegiory. 


SB,0 


20 + 120 t RND (1]::V = 20 » 




2210 SKILL = ASC (KK$) - ASC (" 


RND (1) - 10:W = 20 » RND 




0") 


(1) - 10 


7000 ST = 768iEN = ST + 125 
7010 FOR I = ST TO EN: READ D; POKE 
I,D:S = S + D: NEXT 


































7020 IF S < > 6574 THEN TEXT : 












HOME : PRINT "DATA BASE ERR 






J^^^H^' 






OR", CHR» (7): END 






^ -^ 






7030 POKE 232,0: POKE 233,3: RETURN 






'■ 






7040 DATA 4,0,18,0,65,0,112,0,11 




•- 








9,0,126,0,0,0,0,0,0,0 
7050 DATA 58,63,63,63,60,63,39,6 

3,63,55,214,36,12,24,32,172, - 

50,45,45,45,45,45,36,60,172, 

17,46,53,45,45,45 
7060 DATA 46,30,63,60,63,63,60,6 

2,63,63,77,17,45,45,4,0,59,3 

9,103,45 




-• 








7070 DATA 45,45,44,12,12,12,190, 




w 








62,23,45,45,45,45,45,45,44,3 
6,150,18,54,28,32,63,63,63,6 
3,63,63,63,63 
7080 DATA 119,42,45,45,45,76,9,6 
3,63,63,63,39,0,45,62,231,23 
1,54,4,0,63,46,101,101,54,4, -. 
^ 




SKILL LEUEL = 1 

6 FISH LEFT 


TIME = 188 













SoftSide August I9S1 



61 



The 6502/6809 Journal 

• For the serious user of the 
Apple, PET/CBM, OSI, Atari, 
AiiVI, SYIVI, and KilVI. 

• The premier 6502 resource 
journai— now aiso covering 
the 6809! 

• internationaiiy respected by 
professionals in business, 
industry, and education. 



We accept VISA & Mastercard. 

$18.00 In the U.S. MICRO 

$21 .00 foreign P.O. Box 6502 

surface mall Chelmsford, MA 

(Ask for air rates) 01824 

(617)256-5515 



HaB[711^lfl 



Do you like thinking games? 
Do you like fostKsction 

spectator sports? 
Want to have fun learning 

nnore about computers 

and programming? 
Think you con program 

better than your friends? 

If you answered YES to any of these questions. 
RobotWDf is for you. A gome of the future you 
con ploy today. . 

Create a robot by writing o special Battle 
Language progrom. This program gives your 
robot its unique fighting personality 
Debug your robot on the Test Bench, 
a cybernetic window intoyour Robot's 
nnind. Is it really checking its 
damage level to consider evasive 
action'' Does it increment its rodar 
and lasar cannon aim while seorch- 
ing tor enemies? if oil checi<s out, 
it's on to . 

The Battlefield Challenge up to tour competitors from the Robot Ready Room on your disk. 
Your robot will meet them in the arena where you have o bird's eye view of the mechanical 
carnage. Robots scurry about, radars flash, laser shots fly and explode , , . and only one sur- 
vives. You're the witness to a futuristic Gladiator spectacle 

Available on disk for the Apple canputer with 48K and ^plesoft ROM. at computer stores 
everywhere 

£rom the leader in quality sofKvare 




330 N. CHARLES STREET 
BALTIMORE, MD 21201 
.(301)659-7212 



Th/5 month's special .STAI^F I QHTEHi 

the Sdhre - r^ifg^is o^r- Hia is WARi >foor mission • to oihf /*€ 
SC'TZSQS STARFfCHJlE^ ihrccgh y*c sft^^s /n xarch of fk^ Fetft> 
Rsscorce^ Co/i^/tf/Titf/Viife . The P/K disgOiscfheir cr<ift as -FrkfKlly 
ycsseis f 5*^ /oo mvst take, ctj-^.-'Tc help you a/ong- *i, fminifKf oimof^i' 
•hr ht5 bszri p/ACGd ^ycor c^fsfiosal . // wi/l fAjcc hoors a^- -trainir^ 
o^r^ odtxMyi combed- io rG»d\ -fhe cou<d<2cl /ra„/L *ff STpi^ lO^jO, 

•ilnz r&fo'tsiie skW. Ycor flight aisSGfks or ss/f-^joof'f^ c^rsk. q.^« 

-^ /Ae AfeW PfLOr: Fight fhcgf^ fjght oo^Hk STARFtSHTE'f^ i 




62 



SoftSide August 1981 



ADVENTURE OF THE MONTH CLUB 




TREASURE ISLAND ADVENTURE 



AUGUST ADVENTURE OF THE MONTH 

You are a hardy adventurer in search of fame, fortune, and whatever else you can lay your hands on. You find yourself 
on an island, and you have heard that there is a pirate's treasure here. . . but watch out for the evil magician and the 
underground torture chamber! You may end up in a spot where all roads leading into it are paved with good intentions. . . 



What is Adventure of the Month? 

Everybody likes Adventures — they're challenging and entertaining every time you play. But too often, prepro- 
grammed cassettes and disks cost upwards of $35, a price the manufacturer must charge to defray promotional and 
packaging costs. 

On the other hand, you can enter Adventures yourself, but when you do, you type away all the surprises. As a result, the 
game loses some of its challenge. 

At SoftSide, we've found a way to beat the high cost of Adventuring without having to miss out on any of the fun. We're 
offering no-frill Adventures — high quality Adventures — on cassette or disk at an almost unheard-of price: $5 for 
cassette, $8 on disk. 

We save you money by only advertising this offer to SoftSide readers (you won't see us anywhere else) and by foregoing 
fancy packaging and documentation — you'll get the software and only the software, but we believe it's as good as the 
$50 packages. 

You'll save even more by joining the Adventure of the Month Club. 

Here's how it works: SoftSide's editorial department will select an original BASIC language Adventure each month and 
make it available to you on a subscription basis: 

6 months on cassette: just $27 
6 months on disk: just $45 

Every month we'll tell you about the Adventure you'll be getting in SoftSide Magazine. To order, use the convenient 
order form in this issue — fill it out and send, with payment to: 

Adventure of the Month Club 

Department 681 

6 South Street 

Milford, NH 03055 



SoftSide August 1981 



63 




Dairy Farming 



by David H. Simmons 
(translation contest winner) 

original program by Scott Tapley 

"Dairy Farming" is an Atari Simula 
tion program requiring 16K RAM 




This simulation first appeared 
as an S-80 program three months 
ago, in the May issue of SoftSide. 
Now Atari users, too, can ex- 
perience the challenges of suc- 
ceeding in agri-business. 

You begin your venture with 
half a million dollars, with which 
you must buy a farm, cows, and 
related equipment and supplies. 
To succeed you must accumulate 
10,000 points, based on your 
total assets of land, cows, money, 
etc. You begin by buying one of 
three farms offered to you, and 
then proceed to the three-phase 
daily cycle of the simulation. 

PHASE ONE 

You may undertake any of six 
activities in the first phase of the 
cycle: (1) Milk the cows, (2) Buy 
feed, (3) Buy cows, (4) Feed the 
cows, (5) Take the cows to 
pasture, and (6) Sell milk. 
Feeding the cows is a priority, 
either in the pasture or with feed 
you've bought and stored in your 
silo. Grazing costs you nothing, 
but it does deplete the grass and 
you'll need to let the pasture 
recover for a few days from time 



to time. Not feeding the cows will 
produce two results: First, the 
cows will produce inferior milk 
which will have to be thrown out; 
and second, one of the cows will 
die later in the day. 

When you milk the cows each 
day, you'll notice that each type 
gives a different amount of milk 
(related to the price they com- 
mand at auction). If your coolers 
aren't adequate to hold all the 
milk, some of it will have to be 
sold quickly (and cheaply). If you 
have at least 200 gallons of milk, 
you can sell some or all of it to 
the milkman, and use the money 
to accumulate more points. 

PHASE TWO 

The second phase of each daily 
cycle involves buying and selling 
capital goods. You can buy or sell 
land; buy a cooler, a barn, or a 
silo; or even sell the whole farm if 
you want out. Except for selling 
land, all these things help to ac- 
cumulate points. 

PHASE THREE 

In the third phase of the day's 
cycle, the computer calculates 



your points and financial status, 
and if you have an outstanding 
loan you may make a payment on 
it. Your points are calculated as 
follows: 

One point for every: 
$10,000 in cash. 

5 acres of land. 
500 gallons of milk. 
Small cooler. 

7 Jersey cows. 

6 Guernsey cows. 
5 Ayrshire cows. 

4 Brown Swiss cows. 

3 Holstein cows. 

Two points for every large 

cooler. 

Four points for every small silo. 

Five points for every barn or 

medium silo. 

Six points for every large silo. 

MINUS one point for every 

$100 borrowed. 

Lacking the necessary 10,000 
points, you then begin a new day 
with the same three-phase for- 
mat. When you finally reach your 
goal (IF you do), you are given a 
rating based on the number of 
days elapsed, and you can go 
back to sleeping in past sunrise 
every morning. 



64 



SoftSide August 1981 





A: Acres of land owned. 

AY: Ayrshire cows owned. 

BB: Your bid. 

BID: The current bid. 

BN: Number of barns owned. 

BR: Random increase of bid. 

BS: Brown Swiss cows owned. 

C: Total number of cows owned. 

CE: Indicates whether cows have been fed. 

CLS: Line number of subroutine to clear screen and print 

heading. 

CM: Total capacity of your coolers, in gallons. 

COWS: Cow name. 

DA: Day number. 

DEL1,DEL2: Line numbers of delay subroutines. 

ES: Total point value of your silos. 

F: The farm you picked (1-3). 

FV: Current value of your farm. 

G: Gallons of milk in your cooler. 

GU: Guernsey cows owned. 

HO: Holstein cows owned. 

I: Loop counter. 

JE: Jersey cows owned. 

K: Gallons of milk that didn't fit into your cooler. 

L: Miscellaneous loop variable. 

LA: Large coolers owned. 

LIN$: Graphics string to print line. 

LO: Loan balance. 

MC: Cash on hand. 

MI: Gallons of milk produced that day. 

NUM: Number of cows you're bidding on. 

OP,OP$: Input from keyboard. 

P: Price per acre of land. 

PB: Used to determine if bid is high enough to buy cow. 

PE: People at the auction. 

PER: Percentage of silo capacity actually filled. 

PV: Number of days of good grass left in your pasture. 

R: Random number. 

S: Cubic feet of feed in your silos. 

SH$: Color of man's shirt. 

TABS: ATASCII code for 1 tab. 

VA: Gallons of milk each cow gave that day. 

VB: Value of farm at beginning of game. 

W: Number of acres bought. 

WAIT: Line number of "Press RETURN to 

continue" subroutine. 

WP: Your total points. 

WW: Used to value W at end of game. 

XL: Extra land. 



10 REH DAIRY FARMING 

20 REH By Scott Tapley 

30 REH Atari conversion; David Siiions 

Initialization of variables, 

100 CLR !BN=l:DA=l:CH=500:SC=S0OO:LA=l 

:ES=4;Nti=900:DELl=150:CLS=155!«AIT=UO 

!DEL2=165 

110 DIH C0U«(11),SH$(7),0P«(28),TA6((1 

),LIN«(39) 

115 TAB$=CHR$(127) 

119 REM IN LINE 120 SET LIN« EQUAL TO 

38 CTRL<R>'S PLUS 1 ESC-CTRL<-> 

120 LIN«=" 

n 

145 GOTO 200 

Miscellaneous short subroutines. 

150 FOR 1=1 TO 400:NEXT IsRETURN 

155 POKE 752,l!PRINT CHR»(125)j "DAIRY 

FARMING" SPRINT LINSsRETURN 

160 PRINT SPRINT "Press [RETURN] to co 

ntinue"isINPUT 0P$s60SUB CLSsRETURN 

165 FOR 1=1 TO 1600sNEn IsRETURN 



Print introduction and begin with 
purchase of the fan. 

200 GRAPHICS OsGOBUB CLS 
205 PRINT "In this siiulation of dairy 
farfting, you vtill have 500,000 dolla 
rs to" 

210 PRINT "buy a fars and get started 
in your'sPRINT "dairying career. "sPRIN 
T 

215 PRINT "The object of the si»ulatio 
n is to'iPRINT "accuiulate 10,000 poin 
ts." 

220 PRINT "You get points for such thi 
ngi at'sPRINT "Rilk, cash, land, coms, 
etc. "SPRINT 

225 PRINT "The first thing you do is b 
uy a fans. Each fars consists of 1 bar 
n, 1 snail" 

230 PRINT "house, 1 large silo, 1 refi 
gerated'.'PRINT "iiilk cooler, and 1 hay 
shed. "SPRINT 

235 PRINT "The only difference is the 
nunber of acres that the far* has for 
grazing." 

240 GOSUB MAITsPRINT "FARM lf;TABJ|"AC 
RES"iTAB$i"PRICE";PRINT TAB$i"r;TAB$i 
"lA0"iTAB$j "♦439,000" 
245 PRINT TAB«i"2";TABt!"110"|TAB$;"»3 
99,000"3PRINT TAB$,'"3";TAB$|"95"iTAB$i 
"«369,000"!PRINT 

250 TRAP 250sPRINT "Which fara do you 
Hant to buy {l-31"jsINPUT F 
255 IF F<1 OR F>3 THEN 250 

260 GOTO 260+F 

261 A=140:MC=61000;FV=439000;PV=-20:GO 
TO 265 

continued on next page 



SoftSide August 1981 



65 



continued from previous page 

262 ft=110;MC=101000iFV=399000:PV=-12iG 
OTO 265 

263 A=95!l1C=131000!FV=369000:Pi;=-7 
265 VB=FV!W=A! PRINT :PRINT "Now it'S t 
iiie to go to the auction"iPRINT "and b 
uy soie cattle.,.. ":6DSUB DEL2 

270 QOSUB DEL2:G0SUB CLSiGQSUB 1000:60 
SUB CLS:PRINT "Now that you are done b 
uying your" 

275 PRINT "cattle, you nust ailk them, 
and"!PRINT "sell the «ill; for a profi 
t.":PRINT 

280 PRINT "NON let's go lilk thei cotts 
...VeOSUB DEL2:G0SUB DEL2 

Display current status and give 
activities options. 

300 60SUB CLS:NC=INT(HC)iPRINT "DAY; " 

;DAiTAB$)"YOU HAVE $"i«C!PRINT 'YOUR F 

ARMING EQUIPMENT CONSISTS OFs" 

305 PRINT "1 no. "jF;" fam, with "jAi 

" acres of land"!PRINT "and "iBNj" bar 

n(5)."!PRINT LIN« 

310 PRINT "You have "jINT(G)j" gallons 

of «ilk"!PRINT "in your "iCHj" gallon 

coolerls)." 

315 PER=S/SC!PRINT "Your silols) are " 
i(PERtlOO)i"X fuH'iPRINT LIN* 
320 C=HO+BS+AY+BU+JEiPRINT "NUMBER OF 
COWS!"!PRINT "Holstein 'jHOiTABtj'BroH 
n Swiss ';BS 

325 PRINT "Ayrshire "iAYiTAB»i"6uern5e 
y "iGUiPRINT "Jersey ";JEiTAB*i"T 
OTAL! "iCiPRINT LIN» 
330 PRINT "1. Milk cons (Feed 1st!) 2. 

Buy feed"!PRINT "3. Buy cows at audi 
on 4. Feed cows" 
335 PRINT "5. Take cows to pasture 6. 

Sell iiilk"!PRINT "Enter option (0 to 
continue)"; 

340 TRAP 340! INPUT OP-. IF OP<0 OR 0P>6 
THEN 340 

345 IF 0P=0 THEN 400 
350 GflSUB CLSiON OP 60SUB 1200,1300,10 
00,1400,1500,1600 
355 GOTO 300 

Routine for other purchases. 

400 GOSUB CLS!PRINT "AT THIS TIME YOU 

MAY BUY ANY THINGS NECESSARY FOR YOU 

R FARM." 

405 IF OBNI35 THEN PRINT TAB$j"(You n 

eed a bigger barn!)' 

410 PRINT LINtiPRINT "1. Buy »ore land 

for grazing"!PRINT "2. Sell land for 
quick cash" 

415 PRINT "3. Buy a large or siall coo 
ler":PRINT "4. Buy a bigger barn'sPRIN 
T " (Each holds 25 cows)" 
420 PRINT "5. Buy a larger 5ilo"!PRINT 

"6. Sell fan and end gaiie":PRINT "En 
ter option nusber (0 to cont.)'; 



425 TRAP 425: INPUT OP: IF 0P<0 OR 0P>6 

THEN 425 

430 IF 0P=0 THEN 500 

435 IF 0P=6 THEN 600 

440 GOSUB CLS:60SUB 1900+(0P»100):IF M 

C<0 THEN GOSUB 700 

445 GOTO 400 

End-of-day updates; cow check (and 
killing). 

500 FV=FV+INT(FV»0.01):WW=WW+10!PA=0:D 
A=DA+l!L0=INT(LO+LO«L) 
505 IF MOO AND L0>0 THEN GOSUB 800 
510 IF CE=1 OR C=0 THEN 550 
515 R=INT(RND(0)I5):60SUB 530+R 
520 PRINT CHR»(125):P0SITI0N 2,11:P0KE 
752,1 




>^"<.i^^|^^^^,^ 



v/ 



//.vja'//^. 



\i- 



!"■ " ,/ 



525 PRINT "Since you didn't feed your 
cows today, one of your ";COM$;' cows d 
ied."!60SUB DEL1:G0SUB DELlsGOTO 550 

530 C0N$="Hol5tein";IF H0>0 THEN HO=HO 
-1: RETURN 

531 COli$="Brown Swiss": IF BS>0 THEN BS 
=BS-1: RETURN 

532 C0M*="Ayr5hire"!lF AY>0 THEN AY=AY 
-1: RETURN 

533 COH*="Guernsey":IF GU>0 THEN GU=6U 
-IsRETURN 

534 C0ll»="Jer5ey":IF JE>0 THEN JE=JE-1 
:RETURN 

535 POP !60T0 515 

Current points; end-of-day rating, 

550 WP=NPMH0/3) + (BS/4) + (AY/5) + (GU/6) + 
(JE/7)+ES+(A/5)+(Lfl«2)+SA+(MC/10000) 
555 IF LOO THEN WP=WP-(LO/100) 
560 OP=INT(WP):POKE 752,1:PRINT CHRKl 
25):P0SITI0N 2,Il!PRINT "You now have 
";OPi" points." 

565 PRINT "(";DP/100;"7. of your goal!" 
:CE=0!lF 0P< 10000 THEN GOSUB DEL2:B0T0 
300 



570 GRAPHICS 18:FQR L=l TQ lO-.POSUlQN 
4,2:PRINT «6i" "i POKE 708,5 

6+INT(RND(0)»10)»16 
575 FOR 1=1 TO 60:NEXT hPOSITIQN 4,2: 
PRINT «6;"Y0U DID IT'"!FOR 1=1 TO 75!N 
EXT hSOUND 0,30+RND{0)«50, 12, 10:NEn 
L 

579 REN IN LINES 530-584 TYPE STRINGS 

IN INVERSE VIDEO. 

580 POKE 710, 72: IF DA>I25 THEN OP$="NE 
EDS IMPROVEMENT- A L0T'";60T0 585 

581 IF DA>118 THEN OP$="CQULD BE BETTE 
R.":GOTO 585 

582 IF DA>112 THEN OP*="AVERAGE. ":G0TO 
585 

583 IF DA/105 THEN OP»="PRETTY GOOD!": 
GOTO 585 

584 OP»="A REAL DAIRY FARMER!" 

585 PRINT 16; "YOU NOW HAVE OVER"!PRINT 
«6;"10,000 POINTS!":PRINT »6;"RATING: 

"iPRINT #6;0P»!P0SITI0N 0,8 
590 TRAP 590:P0SITI0N 0,8:PRINT «6;"AN 
OTHER GAME (Y/N)?";:GET )I1,0P!IF 0P=89 
THEN RUN 

593 IF 0P=78 THEN END 
596 GOTO 590 

Selling the fan. 

600 GOSUB CLS:PRINT "When you bought y 
our fans it was worth$";VB;" including 

the ";W;" acres that" 
605 PRINT "ca«e with the fara. SPRINT 
"But now it's worth «";INT(FVH,1);PRI 
NT :)(L=A-« 

610 R=INT(RND(0)«2001):IF R<«« THEN 61 

615 M=)(L>R:1F M>0 THEN PRINT "The land 

you bought is worth $";M;","!60T0 625 
620 M=0:PRINT "You didn't buy any addi 
tional land," 

625 R=INT(RND(0)»35):PRINT "Your cows 
are worth »";C»(1400+Rt35);",":PRINT 
630 PRINT "You have ■;INT(WP);" points 
."!PRINT "Are you sure you want to sel 
1 (Y/N)"; 
635 TRAP 635: INPUT OP»:IF OP»="N' THEN 

RETURN 
640 IF OP*<>"Y" THEN 635 
645 FV=INT (FV+ (FV/9) +MM+C* ( 1400+R»35) ) 
!PRINT :PRINT "You have just been paid 

»"iFVi",- 

650 PRINT "in ca5h."!PRINT "You now ha 
VB «";INT(HC+FV);",":PRINT iPRINT "Do 
you want to play again (Y/N)'; 
655 TRAP 655: INPUT OP«!lF OP«="Y" THEN 

RUN 

660 IF OP$="N" THEN END 
665 GOTO 655 
Accepting a loan, 

700 GOSUB CLS: PRINT "You have spent to 
iuch iioney..,,"!PRINT "You will have 
to take out a loan,' 
705 L=l+INT(RND(0)tl9)!PRINT "You are 
«"iABS(«C)|" in debt,':PRINT "The curr 
ent interest rate is '',\.\"l.' 



66 



SoflSide August 1981 



710 PRINT "Pres [RETURN] to accept the 
loan"! ! INPUT 0P$ 
713 LO=LO+flBS(HC) .•HC=0:L=L/300!RETURN 

Payient on loan, 

800 BOSUB CLS! PRINT "LOAN PAYHENT;"!PR 
INT 'You have «")NC)"," 
805 PRINT "find you owe $"iLOi" on your 
loan. '.-PRINT "Would you like to sake 
a payient on your loan (V/N)'; 
810 INPUT QP$!lF OP«="N" THEN RETURN 
BIS PRINT 'Hon luch Mould you like to 
pay" i! INPUT OP: IF 0P<=0 THEN RETURN 
B20 IF HC<OP THEN PRINT "You don't hav 
e enough ioney!":GQSUB DELliGOTO 81S 
825 LO=INT(LO-OP):NC=INT(HC-OPl!lF LQ< 
=0 THEN PRINT "Your loan is paid off II 
":60SUB DEL2i RETURN 

830 PRINT "You still OHe I'jLO;" on yo 
ur loan.":60SUB DEL2iRETURN 

Buying the cohs at auction. 

1000 PRINT "There are 5 different kind 

5 of coMs. (Listed in order of <iilk p 

reduction)!' 

1005 PRINT "COW l!"iTAB$)"TYPE! "iT 

AB$i" BIDi'jPRINT TAB«!'riTAB$i"Hol5t 

ein";TAB»i'»1500" 

1010 PRINT TAB$|"2'iTAB«i"BroMn Swiss" 

iTAB$i" UOO'iPRINT TAB«i"3"iTflB$;"Ayr 

shire'iTABi;" 1325" 

1015 PRINT TAB»i'4"iTAB«i"6uernsey"iTA 

B»|" 1250"!PR1NT TAB$i'5"iTAB$i"Jer5ey 

'jTABIj" 1185" 
1020 PRINT TAB$)"6'jTAB$;"To not bid o 
n any coms" 

1025 PRINT iPRINT "You have $";NCi". W 
hich type of":PRINT "con do you xant t 
bid on (l-6)"i 

1030 TRAP 1030! INPUT OP; IF 0P<1 OR 0P> 
i THEN 1030 

1031 IF 0P=6 THEN RETURN 

1035 TRAP 1035!PRINT "Hon nany cons do 
you Hant to buy"; : INPUT NUHjIF NUH<1 
THEN 1035 

1040 GOTO 1040+OP 

1041 C0W$="Holstein":BID=1500!PB=1500i 
GOTO 1050 

1042 COW«="BroNn SNiss"iBID=1400!PB=14 
00: GOTO 1050 

1043 C0W$="Ayrshire"!BlD=1325!PB=1325: 
GOTO 1050 

1044 C0W$="6uern5ey"!BID=1250!PB=1250! 
SOTO 1050 

1045 C0W»="Jersey":BlD=1185!PB=1185 
1050 60SUB CLS!PE=10+INT(RND(0)t40):PR 
INT 'There are ";PEi" people here toda 

Y." 

1055 PRINT "The nusber of people at th 

e auction Nill influence hoN high yo 

u have to" 

lOtO PRINT "bid to purchase your coNJs 

).":PRINT LIN$!PR1NT "The bidding on t 

he ';COW< 



1065 PRINT "has just started, ":PRINT " 

with a bid of t'jBIDi" per con." 

1070 TRAP 1070iPOSITION 2,ll!PRlNT CHR 

$(15<i)iCHR$(156);CHR$(156)|"The curren 

t bid is $"|BID;" per con," 

1075 PRINT "Enter your bid (0 to quit) 

";! INPUT BB!lF BBOO THEN 1095 

1080 R=l+INT(RND(0)«4l!GOSUB 1090+R:PR 

INT iPRINT "SQLD--"!PRINT "to the man 

in the ";SH$i" shirt!" 

1085 GOTO 1125 

1091 SH$="YelloN"!RETURN 

1092 SH$="Green"!RETURN 

1093 SH$="Striped"!RETURN 

1094 SH$="Blue"!RETURN 

1095 IF BB<BID THEN PRINT "BID TOO LOW 
."!GOSUB DELI ! GOTO 1070 

1100 IF (BB«NUM)>MC THEN PRINT "YOU DO 
N'T HAVE ENOUGH N0NEYI"!GQ5UB DELliGOT 
1070 




1105 IF BB>PB+1PE<25)+RND(0)«500 THEN 

GOTO 1115 

1110 BID=BB+ll+INT(RND(O)tl5)!G0T0 107 



1115 PRINT iPRINT TAB$iTAB$i"SOLD! ! !": 

NC=1NT(HC-BBINUH)!60SUB 1119+0P!6OT0 1 

125 

1120 HD=HOtNUIl! RETURN 

1121 BS=BStNUM! RETURN 

1122 AY=AY+NUfl! RETURN 

1123 6U=GU+NUIl! RETURN 

1124 JE=JE+NUHiRETURN 

1125 PRINT tPRINT "Do you Nant to buy 
any iiore cons Y/N"; 

1130 TRAP mOilNPUT OP«:IF OP$="N" TH 

EN RETURN 

1135 IF 0P$="Y" then GOSUB CLSiGOTO 10 

00 

1140 GOTO 1130 

Milking the cons. 

1200 IF PA=1 THEN POSITION 3,12!PRINT 
"YOU'VE ALREADY MILKED THEN TODAY!!!": 
GOSUB DEL2: RETURN 



1205 PA=l!VA=(2.1+(INTIRND(0)t39)/10)) 

t2 

1210 PRINT "NILK PRODUCTION!" 

1215 IF H0>0 THEN PRINT "Your Holstein 

CONS gave ";INT(HOtVA);' gallons' 
1220 VA=VA-0.2!lF BS>0 THEN PRINT 'You 
r BroNn SnIss cons gave ';INTIBStVA);' 

gall." 

1225 VA=VA-0.2!lF AY>0 THEN PRINT "You 
r Ayrshire cons gave ";INT(AYtVA);' ga 
11." 

1230 VA=VA-0.2iIF GU>0 THEN PRINT "You 
r Suernsey cons gave "jINTIGUIVA);' ga 
II." 

1235 VA=VA-0.2:IF JE>0 THEN PRINT "You 
r Jersey cons gave ";INT(JEtVA);" gall 

II 

1240 HI=(H0»(VA+0.3))+(BS«(VA+0.A))+(A 

Y»(VA+0.4))+(6Ut(VA+0.2))+(JE«VA)!G»6+ 

HI 

1245 PRINT "Total lilk production ")NI 

;" gallons." 

1250 IF CE=0 THEN R=10+INT(RND(0)»28)! 

PRINT iPRINT "Since you didn't feed yo 

ur CONS," 

1255 IF CE=0 THEN PRINT Rj")i of the li 

Ik wasn't good enough":PRINT "and had 

to be thrown out."!G=G-HI»(R/100) 

1260 IF G>CI1 THEN PRINT iPRlNT "Your c 

ooler isn't big enough to hold all of 

that Bilk. ...You'll have to" 
1265 IF G>CN THEN PRINT "sell the extr 
a riilk at t.75/gallon"!K=6-CMi6=CN!HC= 
MC+(K»0.75) 
1270 IF K>0 THEN PRINT iPRINT "You got 

"iKIO.75;" for the extra lilk." 
1275 K=Oi GOSUB DEL2i RETURN 

Buying feed. 

1300 PRINT "Your silo is ";PERtlOOi'X 
full. "iPRINT 'It costs «2.50 a day to 
feed a con.' 
1305 PRINT "You have "iCj" cows and «" 

■ u r ■ H <■ 

iHC; . 

1310 TRAP 1310:PRINT "Hon nany days no 

rth of food Nould you like to buy"; i IN 

PUT OP! IF 0P<=0 THEN GOTO WAIT 

1315 0P=0P>C«2.5!lF OP>«C THEN PRINT " 

You don't have enough (ioney!"tGDSUB DE 

LliGOTO 1310 

1320 NC=INT(«C-OP)!S=S+OP!PER=S/SC!PRI 

NT "That cost you ♦';0P;", 'iPRINT 'You 

have »";HC;" left." 
1325 IF PER>1 THEN PRINT "Your silo is 

full!!!' 
1330 GOSUB DEL2!RETURN 

Feeding the cows. 

1400 IF CE=1 THEN POSITION 4,12!PRINT 
'YOU'VE ALREADY FED THEN TODAY! II "jGOS 
UB DEL2iRETURN 

1405 0P=C«2.5!lF S<OP THEN POSITION 2, 
lOiPRINT "YOU DON'T HAVE ENOUGH FEED T 
FEED ALLOF YOUR COWS--" 

continued on page 69 



SoftSide August 1981 



67 



Take the fat off BASIC and turn it into 
swift, trim, IVIachine Language... 




...without any sweat from you. 

INTRODUCING THE HAYDEN APPLESOFT COMPILER 

For only $175.00 



You can cut the fat from BASIC with the 
HAYDEN APPLESOFT COMPILER, the 
first true compiler available for the Apple II 
computer. This multi-pass compiler allows 
your BASIC programs to run up to ten 
times faster in Machine Language — faster 
than your Apple 11 can normally interpret 
Applesoft BASIC. 

The HAYDEN COMPILER FEATURES: 

* Runs standard Applesoft BASIC 
programs up to ten times faster. 

* Seventeen-pass compiler produces true 
machine code. 

* Compiles code at user specified 
address. 

* Requires only Applesoft in ROM and 
one disk drive. 

* Handles Hi-Res graphics and shape 
tables. 

* Arithmetic completed for faster 
operation. 

* Allows multiple programs to reside in 
memory at the same time. 

* Works in a single or multiple disk 
environment or with hard disk. 

* At the end of compilation, the compiler 
provides a detailed analysis of the 
structure. 



System Requirements 

A 48K Apple II Plus or Apple II with 

Applesoft in ROM. 

The Autostart ROM chip and at least 

one disk drive. 

Systems equipped with language 

system or Microsoft RAMCard. 

Introductory price for our readers 
Save $25 Limited time only* 



$175.00 



The HAYDEN APPLESOFT COMPILER is a 
product of the Hayden Book Company, Inc. 

•offer expires September 15, 1981 

■55ft5iae, 



6 5outh street Milford NH 03055 
For Orders Only 603-673-0585 



l^^^^^y I 



68 



SoftSide August 1981 



continued from page 67 

1410 IF S<OP THEN PRINT "YOU'LL HfiVE T 
BUY NQRE FEED FIRST. "sGOSUB DEL2:RET 
URN 

1415 PRINT iPRINT sPRINT "Press [RETUR 
N] to feed, or D for don'tleed";: INPUT 
OP$iIF OP»='D" THEN RETURN 
1420 PRINT "Cows are being fed." 
1425 CE=l:PV=PV-l!S=S-QP!PER=S/SC!GOSU 
B DELI: RETURN 

Putting cows out to pasture. 

1500 IF CE=1 THEN POSITION 4,12!PRINT 
■YOU'VE ALREADY FED THEM TODAY!! !"!GOS 
UB DEL2: RETURN 

1505 IF PV>9 THEN PRINT "Your coms hav 
e eaten all of the'iPRINT 'good grass 
in the pasture." 

1510 IF PV>9 THEN PRINT "In other word 
s, you Mill have to let the grass gro 
N for a fcM days.":GQSUB DEL2:RETURN 
1515 IF OA THEN PRINT "You need to bu 
y lore Iand!!":60SUB DEL2i60T0 400 
1520 PRINT iPRINT "Cons are entering p 
a5ture....":60SUB DELlsPRINT iPRINT "C 
ONS are eating grass.... ":GOSUB DELI 
1525 PRINT iPRINT "Cows are done eatin 
g...."i60SUB DELliPRINT iPRINT "Cows a 
re going back to barn....":60SUB DEL2 
1530 CE=liPV=PV+liRETURN 

Selling niU. 

UOO IF 6<200 THEN POSITION 2,12iPRINT 
•YOU DON'T HAVE ENOUGH NILK TO SELL Y 

ET'iGOSUB DEL2!RETURN 

li05 BP=0.9+(INT(RND(0)t36)/10) 

1610 PRINT "The local nilkian Mill buy 
your lilk for $"iBPi" per gallon." 

1615 PRINT "You have ";6)" gallons of 

■ilk." 

1620 TRAP 1620:PRINT "How iiany gallons 
will you sell'iilNPUT OP 

1625 IF 6<0P THEN PRINT "You don't hav 

e that •uch!!"!GQSUB DELliGOTO 1620 

1630 NC=«C+(0P«BP):6=G-0P!RETURN 

Buying land. 

2000 P=B50fINT(RND(0) 1901) iPRINT "An a 
ere of land will cost you $"iP 
2005 PRINT 'How lany acres do you want 
to buy"):INPUT OPiOP=INT(OP)iIF 0P<1 
THEN RETURN 

2010 IF I1C<0P«P THEN PRINT "You don't 
have enough ioney!!"iG0SU6 DELliGOTO 2 
005 

2015 NC=l1C-0PtP! PRINT "That cost you $ 
"iOPtPi", "iPRINT "you now have $"iHC 
2020 A^A^OPiGOSUB DEL2iRETURN 

Selling land. 

2100 P=950+INT(RND(0)»801)iPRINT "You 
can sell land for $";P;" an acre." 



>^"i 



2105 PRINT "How many acres do you want 
to selTiilNPUT OPiOP=INT(OP)!lF 0P<1 
THEN RETURN 

2110 IF OP>fl-C THEN PRINT "You need "; 

Ci" acres for the cowsl'iGOSUB DEL2iRE 

TURN 

2115 l1C=HC+(0P»P)iA=A-OPiPRINT "You no 

M have «";NCi60SUB DELZiRETURN 

Buying a cooler. 

2200 PRINT "Nilk Cooler5i"iPRINT "L = 
Large Cooler (500 gallon) »4,500" 
2205 PRINT "S = Stall Cooler (200 gall 
on) $2,500"iPRINT "N= No Cooler" 
2210 PRINT "Which cooler do you want"; 
i INPUT OP*iIF 0PJ="N" THEN RETURN 
2215 IF OP$="L" THEN «C=MC-4500iCH=C11+ 
500iLA=LA+liRETURN 




""■" ''''//Jrit^ 




2220 IF OP»="S" THEN HC=HC-2500iCI1=CH+ 

200iSA=SA+liRETURN 

2225 GOTO 2210 

Buying a barn. 

2300 PRINT "A barn costs $5,000. "iPRIN 

T "(If you don't want it, typei N [RET 

])" 

2305 PRINT "Press [RETURN] to buy barn 

"ii INPUT OPtilF 0P$<>"" THEN RETURN 

2310 BN=BN+l!l1C=l1C-5000!RETURN 

Buying a silo. 

2400 PRINT "Silo Typesi "iPRINT "II. La 

rge silo (8000 ft.) $7,500" 

2405 PRINT " 2. Mediui silo (7000 ft.) 

$6,000" iPRINT " 3. Siall silo (6000 
ft.) $5,000"iPRINT " 4. No silo" 
2410 PRINT "Which silo would you like 
to buy"|i INPUT OPilF 0P<1 OR 0P>4 THEN 

2410 

2415 GOTO 2415+(0P«5) 
2420 HC=MC-7500i SC=SC+BOC0i ES=ES+6i RET 
URN 

2425 NC=«C-6000iSC=SC+7000iES=ES+5iRET 
URN 

2430 l1C=HC-5000iSC=SC+6O00iES=ES+4!RET 
URN 
2435 RETURN 



© 



>r-r 





recordings 



duplicating service 



307 W/est Main Street 
Maple Shade, NJ 08052 

(609)667-1667 



O • AMP "Data-settle" blank 
cassettes for digital use 

• Cassette Storage Boxes 

• Cassette Labels - 

Custom printing & blank 

• Custom Record A/bum 

production from your tapes 

•Stereo and Spoken Word 
cassette duplication 

Call or write to: 




tor more Information. 

All cassette work at 
Ah^PR. &[)■ is custom work 
to fit your needs. 




VINYL 
BINDERS 

Colleclors! Protect your SoftSide back 
issues, Volumes I and It, or any publication of 
your ctioice, with these duratile wood-grain 
vinyl binders witfi inside pocket and clear 
spine sleeve tor easy identification. Holds 
and protects 12 back issues. A regular $4.95 
value, SALE priced at $3.95*. FREE (while 
supply lasts) with the purchase ot Volume I or 
II (12 issue collection ot SottSide). 



SMALL . 
av? X 11 



• $3.95 
.$7.95 



Select ioiu- 

^^^r 6 iouth Stro»l Milford MH 010S5 



SoftSide August 1981 



69 



TRS-80 seRsatioRal 

software 



GPeatlve 

GonepsittRg^ 

software 



Stock & Options Analysis 



Cassette CS-3306 [16K), $99.95 
DiskCS-3801 {32K), $99.95 

Should you hedge, buy, or sell out? Stock 
and Options Analysis puts a securities advisor 
in your computer, providing you witii four 
powerful investment tools. Option gives 
important indices for opening and closing 
call option transactions. Opgraph presents 
a graph or table of profit for any combination 
of long or short calls, puts, and stocks. This 
allows the detailed evaluation of three types 
of hedges. Newprem helps predict the future 
premiums of an option at any desired time 
and future stock price. Portval lets the 
computer do the paper work, providing full 
portfolio services, including value per share, 
current value, and capital gain. The program 
includes the effects of commissions, margin 
interest and dividends. Beyond helping to 
organize and evaluate your present portfolio, 
Stock and Options Analysis is an excellent 
aid for planning and testing future 
strategies. The comprehensive 24-page 
manual with this package not only shows 
how the programs work, but is also a primer 
on the strategy of hedging listed options 
against common stocks. This strategy has 
been repeatedly shown to actually be more 
conservative and more consistently profitable 
than straight buying and selling of stocks. 





Solar Energy Analysis 



Cassette CS-3307 (16K), $49.95 

Disk CS-3802(32K) $99,95 

F-Chart Solar Energy Analysis eliminates 
many of the tedious calculations required 
when designing solar-heating systems. 
Beyond providing a thermal analysis, the 
program allows designers to quickly deter- 
mine the effects of changing any specifica- 
tions, allowing fast, accurate, and inexpensive 
experimentation. 

Systems using air, liquid, or domestic hot 
water in any climate can be analyzed in 
detail. The program expands the traditional 
F-Chart procedure by taking ground-water 



Available 7/81 



mixing valves in domestic hot water systems, 
F-Chart Solar Energy Analysis quickly pays 
for itself by freeing you from time-consuming 
calculations 

The disk version of the program includes 
a data base of all necessary climatic data 
for any location in the United States These 
data are in the printed booklet included 
with the cassette version but must be entered 
manually for your geographic location. 




Personal Address and 
Information System 



Text Processing 



Disk CS-3509(32K) $24.95 

Isyouraddress book beginning to resemble 
a heavily-edited inkblot? Do your friends 
keep moving, forcing you to cross cut and 
rewrite addresses and phone numbers? Let 
the Personal Address & Information System 



turn filing drudgery into computing pleasure. 
You can store all the crucial information, 
including name, address, home and work 
phone numbers, spouse's name, and 
comments or remarks. At any time, the 
information can be edited or changed. 

And there's more. Names can be sorted 
in alphabetical order. Entire entries can be 
printed, as well as mailing labels. Names 
can be searched for by first letter. In a 32K 
system, you can search any record for up to 
two key phrases, turning Personal Address 
& Information System into a versatile filing 
system with unlimited uses. 



Available 7/81 




Cassette CS-3302 ( 1 6K) $ 1 4.95 



This program turns a 16K. TRS-80 and 
lineprinter into a line oriented text-processing 
system. 



>, THIS IS IK tumas oditk canninG m pnassa 

>2 IT CDI m IWff UMDIU, IHIICSi in IT MMT RtM VIU! 
>3 tUCTRlC MW- ITISdKIICmilllHyPtBUmKI 
)4 A TIXT FlillllSSai TDnnOITICCtmFDTmiUIIIC 
)S EUCmiC EUIKO. KIT I M NOT « mr OC WD CM Oif 
» DO IWHC TMICS LIKE DDI n tXHtTIIC Ml EAT !Mi 



CS-3504 Disk I32K) $24.95 
(Disk includes Checking 
Account. CS- 33041 





anims 


c 


COHIIHUE LIST OH SU41H 


I 


IQfTEUIC 




BIT 




IHSOT Lire 




ttSUC KEYING 




LIST ON sora 




PRINT HflRD CCf-y 




QUIT PROOMH 




SflVECNTIift 


COWN)? 





Developed exclusively for ttie TRS-80 
this program lets you use the computer to 
enter general text or business letters, edit 
and modify your work, save text on cassette 
tapes, and print out a perfect report, docu- 
ment, or letter every time. 



Editing commands are similar to those 
used in Level II BASIC, so there are no 
complicated new commands to learn Lines 
may be either inserted or deleted. A special 
format is available to speed entry of business 
letters. Final printout can be done in 
numbered pages and you may print multiple 
copies. 



Business Address & 
Information System 

DiskCS-3510(48K) $24.95 Available 7/81 

Do you need quick access to business 
contacts and customers? Put more organiza- 
tion in your organization with the Business 
Address & Information System. A complete 
file containing company name, address, 
phone number, and comments can be quickly 
entered and stored. Information can be 

TRS-aO IS [he regpsierecl irafleniarf, of Tandy Co/p 



changed or edited whenever necessary. 
The program allows entire entries to be 
printed, and can also generate mailing 
labels. 

When you need information fast, you can 
sea.xh for specific names or find all entries 
that contain one or two key phrases. Any 
key phrases can be used . Business Address 
& Information System will help you make 
the most of your time, putting the routine 
work in the computer where it belongs. 



Order Today 



Toorderanyof these software packages, 
send payment plus $2 00 postage and 
handling per order to Creative Computing, 
Morns Plains. NJ 07950. Visa. MasterCard 
and Amencan Express orders may be called 
in toll-free 



Order today at no nsk If you are nol 
completely satisfied, your money will be 
promptly and courteously refunded 

Creative Computmg Software 

Morns Plains NJ 07950 

Toll-free 800-631-81 12 

In NJ. 201-540-0445 



GPeafcive computing software 



TRS-80 



seRsatioRal 
software 



GPeative 

GoinpatiRC^ 

software 




Trucker 

arid 

Streets 



CS-3207 TRS-80 Cassette (32K) ,p . □. 
CS-3703 TRS-80 Disk (32K) ^■^^■•do 

Trucker 

This program simulates coast-to-coast 
trips by an independent trucker hauling 
various cargos. The user may haul 
oranges, freight or U.S. mail. All have dif- 
terenl risks and rewards. Maximum profit 
comes from prudent risk-taking. 

If all goes well, you can obey the speed 
limits, stop for eight hours of sleep eacfi 
night and still meet the schedule Bad 
weather, road construction or flat tires 
mav put you behind schedule. You may try 
to increase your profit by skimping on 
sleep, driving fast or carrying an over- 
weight load. 

Other factors are choice of routes, truck 
payments, fuel, food, tolls and fines. The 
simulation is engrossing and informative. 



Of the City 

the City 

mulation is modeled on Grand 
chigan, a metropolitan area with 
a population of 550,000. The budgeting, 
cost and work standard bases are derived 
from actual experiences of the city over 
the past five years. The objective of the 
simulation is to complete a ten-year plan 
of street and transit improvements while 
retaining the support of a majority of the 
City Commission. 

During your tenure, you must construct 
streets and Interstate highways, repair 
existing streets, and improve traffic safety. 
For the Transit Authority you have to up- 
grade and replace a deiapidated bus fleet, 
increase ridership. reduce maintenance 
downtime and improve on-shedule perfor- 
mance 

Other factors to be considered are oper- 
ating tax levies, construction bonding and 
labor negotiations. The simulation pro- 
vides a substantial challenge and it is both 
educational and entertaining. 



Hail to the Chief 




by 
Phillip W. Brashear 

and 
Richard G. Vance 



CS-3701 TRS-80 Disk. 48K 



$24.95 



Your object in this simulation is to be 
elected president, in your campaign you 
set your strategy and carry it out week by 
week. You may run TV or magazine ads. 
travel to different states, hold news con- 
ferences and participate in a debate. 

You must take a position on ten campaign 
issues such as Energy Policy, Unemploy- 
ment. Taxes, Mid-East Policy and Strategic 
Arms Limitations. You must manage your 
fund raising efforts to business, labor and 
mass direct mail solicitations. 

The package includes four models of 
varying complexity; each can be used at 
ten levels of difficulty. The more complex 
models introduce the influences of incum- 
bancy. campaign finance and spending 
limits. 

Hail to the Chief has been used as a 
teaching aid in Political Science, Vot'ng 
Behavior and Computer Science at the 
University level since 1976. It is a well 
proven package which includes a compre- 
hensive manual. 



3 Adventures 



DiskCS-3516 S39.95 
Requires 32K 




Advenlureland (by Scott Adams) 
You II encounter wild animals 
dwarfs and many other puzzles 
and penis as you wander through 
an enchanted world, trying to res- 
cue the 13 lost treasures Can 
you rescue the Blue Ox from Ihe 
quicksand'^ Or find 'your way out 
of the maze of pils'^ Happy 
Adventuring' 

Pirate Adventure (by Scotl 
Adams}- Yo Ho Ho and a bottle 
of rum You II meet up with 

the pirate and his daffy bird along 
with many strange sights as you 
attempt lo go from your London 
flat to Treasure Island Can you 
recover Long John Silvers lost 
treasures'^ Happy sailing matey 

Mission Impossible Adventure (by 

Scott Adams)- Good fvlorning 
Your mission is lo and so it 
starts Will you be able to complete 
your mission in time'^ Or is Ihe 
worlds first automated nuclear 
reactor doomed"^ This one s well 
named its hard there is no magic 
but plenty of suspense 
Good Luck 



Voodoo Castle 
The Count and Ghost Town 



Voodoo Castle (by Scott Adams). Count 
Cristo has had a fiendish curse put on him 
by his enemies. There he lies, you are his 
only hope . . . will you be able to rescue 
him — or is he forever doomed? Beware 
the Voodoo man. 

The Count (by Scott Adams). You wake up 
in a large brass bed somewhere in Tran- 
sylvania. Who are you, what are you doing 
here, and why did the postman deliver a 
bottle of blood*;* You II love this Adventure 
In fact, you might say its Love at First 
Byte. . , 

Ghost Town (by Scott Adams) Explore a 
deserted western mining town m search of 
1 3 treasures. From rattlesnakes to runaway 
horses, this Adventure has them all' Just 
remember, pardner. they don t call them 
Ghost Towns for nothin' (Also includes a 
new bonus scoring system.) 



DiskCS-3517 S39 95 
Requires 32K 



/ 




Original Adventure 

DiskCS-3518|48K)S19 95 

This IS the original adventure game complete 
with a colossal cave populated with nasty 
little dwarves, a giant clam, troolsand much, 
much more Includes the SAM76 language 
in which the game runs 



Adventures on Cassette 

Five adventures are available separately 

on cassette. Each requires 16K and costs 

$14.95 

CS-3007 Advenlureland 

CS-3008 Pirate Adventure 

CS-3009 Mission Impossible 

CS-3010 Voodoo Castle 

CR-3011 The Count 



Order Today 



To order any of these software packages 
send payment plus S2 00 postage and 
handling per order to Creative Computing 
Morns Plains NJ 07950 Visa MasterCard 
and American Express orders may be called 
in loll-free 



Order today at no risk If you are not 
completely satisfied your money will be 
promptly and courteously retunded 

Creative Comouting Software 

Morns Plains NJ 0/950 

Toll-free 800-631-8112 

In NJ 201-540-0445 



creative computing software 



iiaaemark ol Tandy Co(p 




Computer Graphics 



by Joan R. Truckenbrod 

Reflective Symmetry Pattern Systems 

Patterns developed with reflective 
symmetry systems consist of a figure 
and its mirror image. A pair of images 
consisting of the original figure and its 
reflection or mirror image can be 
created by holding a picture perpen- 
dicular to a mirror. The image in the 
mirror appears to be backwards. A 
reflective symmetry pattern includes 
the figure in its original orientation and 
in its reflected or mirrored state. This 
pair of figures can be repeated and ar- 
ranged on various types of grids. (See 
SoftSide June and July 1981 for 
descriptions of alternate grids used for 
creating patterns.) In reflective sym- 
metry a figure is reflected in reference 
to an axis. This axis can be horizontal, 
vertical or diagonal. This article 
describes the process of reflecting a 
figure in relation to a vertical axis. The 
next issue will include an article on the 
use of a horizontal axis for reflection. 
The combination of horizontal and 
vertical reflections will be illustrated in 
the following issue. 

The two figures you see when you 
hold a picture perpendicular to a mir- 
ror constitute a pair of reflected im- 
ages. The axis of reflection is the ver- 
tical Une on the mirror where the pic- 
ture is touching the mirror. To see a 
second pair of reflected figures, place 
the opposite edge of the picture 
perpendicular to the mirror. A figure 
can be reflected to the right or to the 
left as the axis can be placed on either 
side of the figure. Two distinct sym- 
metrical pairs can be created by placing 
the vertical axis to the right or left of 
the figure and reflecting the figure on 
the respective axis. Figure 1 il- 
lustrates the effect of placing this axis 
of reflection to the right of the figure 
and then to the left. 



































































































































































































































































: 


Fil 


JU 


re 


1 
1 























The reflection in these examples is 
reflection in a horizontal direction; 
consequently the X coordinates of the 
original figure are changed in creating 
the coordinates of the reflected figure. 
72 



In order to create the mirror image of a 
figure, all of the X coordinates of the 
original figure are subtracted from the 
largest X coordinate in the figure. The 
programs illustrated here use a design 
module 23 units wide, so all of the X 
coordinates are subtracted from 23 to 
create the X coordinates of the 
reflected figure. The Y coordinates re- 
main the same since the figure is only 
being reflected towards the right or left 
and not up or down. The subroutine in 
the program that performs this reflec- 
tion is subroutine 4000. 

The reflexive pairs in Figure 1 can be 
repeated in different arrangements, as 
shown in Figure 2, to create reflective 
symmetry patterns. 



The following programs can be used 
to create patterns based on both ar- 
rangements shown in Figures 2a and 
2b. The first arrangement is created 
with the original program. Horizontal 
Reflection 1 . Patterns in Figure 3 were 
created with this program. The figure 
arrangement in Figure 2b can be 
created by adding four program lines 
(107, 190, 195, 200) to the original pro- 
gram. This modified program. 
Horizontal Reflection 2, is illustrated 
in Figure 4. The design modules used in 
these programs are constructed in a 
square 23 units by 23 units. Experiment 
with your designs, as these programs 
can be used imaginatively to create 
dynamic patterns. 



1 


, 


L 


1 


J 1 1 








1 i 








, 






































- 










































































































































































































































































































- 










































































Figure 2a 




1 ' I 1 1 1 1 1 1 


- 




































- 


































































































































































































































































































- 










































































1 
Figi 


ire 


2b 




1 1 








1 1 








1 



SoftSide August 1981 




Figure 3 





Figure 4 



Horizontal Reflection 1 



5 TEXT ! HOME 


180 NEXT N 


10 REM HORIZONTAL REFLECTION 1 


250 NEXT N 


15 REH by JOAN R. TRUCKENBROD 


350 END 


20 REM COPYRIGHT 1981 


3000 REM PLOTTING SUBROUTINE 


50 DIN l((50),Y(50),n(50),Yl(50) 


3005 IF N > 179 GOTO 350 


,N)((50),NY(50) 


3010 HPLOT NX(l) + M,NY(1) + N 


58 REN NPTS IS THE NUMBER OF 


3020 FOR I = 2 TO NPTS 


POINTS IN THE FIGURE 


3030 HPLOT TO NX(I) + M,NY(I) + 


60 NPTS = 12 


N 


70 FOR I = 1 TO NPTS: READ Xd), 


3040 NEXT I 


Yd): NEXT I 


3050 RETURN 


90 REM DATA DESCRIBE THE FIGURE 


4000 REM SUBROUTINE FOR 


95 DATA 15,0,23,10,23,17,20,23, 


HORIZONTAL REFLECTION 


18,19,6,23,0,23,14,15,11,10, 


4020 FOR I = 1 TO NPTS 


6,10,0,5,15,0 


4030 XKI) = 23 - Xdl 


103 GOSUB 4000 


4040 Yld) = Yd) 


104 H6R2 


4045 NEXT I 


105 HCOLOR= 7 


4150 RETURN 


109 L = 1 


4900 REM SUBROUTINE 5000 ASSIGNS 


110 FOR N = 12 TO 160 STEP 24 


VALUES FOR PLOTTING ARRAYS 


120 FOR H = 5 TO 240 STEP 24 


NX AND NY 


150 ON L GOSUB 5000,5100 


5000 FOR I = 1 TO NPTS 


160 GOSUB 3000 


5010 NXd) = Xd) 


170 L = L + 1 


5020 NYd) = Yd) 


175 IF L > 2 THEN L = 1 


5030 NEXT I 




SoftSide August 1981 



5040 RETURN 

5100 FOR I = I TO NPTS 

5110 NXd) = XKI) 

5120 NYd) = Yld) + .5 

5130 NEXT I 

5140 RETURN 

Horizontal Reflection 2 

10 REM HORIZONTAL REFLECTION 2 



107 C = 1 




109 L = 1 




110 FOR N = 12 TO 160 STEP 24 




120 FOR H = 5 TO 240 STEP 24 




150 ON L GOSUB 5000,5100 




160 GOSUB 3000 




170 L = L + 1 




175 IF L > 2 THEN L = 1 




180 NEXT H 




190 C = C + 1 




195 IF C > 2 THEN C = 1 




200 L = C 




250 NEXT N 




350 END 






73 



Let PASCAL-80 talk some sense 
into your computer 



k> > 



Phelps Gates, the author of "APL-80", brings you 'Tascal-80' 
for your S-80. Now you can add another dimension to your 
programming skills by using this fast version of the compiled 
language Pascal. 

"Pascal-80" is a powerful, structured and well-defined language 
for the S-80 microcomputer. This easy-to-use language makes 
writing well-structured, and therefore easily understandable 
programs simple. "Pascal-80" supports most of the features of 
U'CSD Pascal, including RECORD, SET (to 256 members), FILE 
(text and record oriented), n-dimensional ARRAY (and ARRAY of 
ARRAY, etc.), global GOTO ELSE in CASE statements, and BCD 
arithmetic accurate to a full 14 places (including log and trig 
functions), 6-digit optional. "Pascal-80"features a 23600 byte 
workspace in 48K, a 1000 hne per minute compiler, an easy-to-use 
text editor, and plain English error messages, all the features you 
would expect in a Pascal costing hundreds more. 



Variable Types: .... Boolean, integer, char, real, real6, and text. 

Constants: Maxint, minint, true, false, and pi. 

Files: Input, output, and Ip. 

Procedures: Read, readin, write, writein, reset, rewrite, close, seek, els, 

and poke. 

Functions: Abs, arctan, call, chr, cos, eof, coin, exp, inkey, in, mem, 

odd, ord, peek, pred, round, sin, signif, sqr, sqrt, succ, and trunc. 




"Pascal-80" does not implement variant records, pointer 
and window variables, or functions and procedures used as 
parameters. 
S-80 32K Disk $99.95 



■SoftSiae, 




lony 



6 5outh Stravt Milford NH 03055 
For Orders Only 603-673-0585 



FEATURES: 



1) Radio Shack compatibility 

2) Error free variable length records 

3) Full lower case detection and support 

4) Repeating keyboard with NO keybounce EVER 

5) Shift [0] typewriter keyboard option 

6) Execute only protection feature for BASIC programs 

7) Automatic track support for 35 through 80 track drives (mixed) 

8) Device I/O handling with FORCE command 

9) Supports high speed clock modification (up to 4.0mhz) 

10) Supports mixed mode (single & double density) automatically 

11) Allows disable-enable of break key 

12) Allows user to define step rate per drive and re-configure system disk 

13) Allows for efficient use of double-headed drives 

14) Built in screen printer (shift [CLEAR]) with [BREAK] key abort 

15) Multiple command chaining with "DO" 

16) Built in memory test with CLEAR command 

17) New printer driver which allows complete forms control and paging 

18) Automatic serial printer driver with optional auto linefeed 

19) Execute any DOS command from BASIC and retum to BASIC 

20) Free space map of diskette with optional output to printer 

21) Copy with variable length files 

22) Complete RS232 control from keyboard with status check 

23) Create and pre-allocate files from DOS 

24) Display current date and time from DOS 

25) More information from Directory with optional printer output 

26) Enter DEBUG with shift [BREAK] to allow use of [BREAK] from BASIC 

27) New DISKDUMP/CMD sector display/modify program (works with filespecs) 

28) New DISKZAP/CMD single/double density disk editor 

29) New BACKUP (more reliable, no more pack ID check) 

30) New FORMAT (more reliable, no need to bulk erase disk first) 

31) New MAP utility (maps out disk, showing where files are located) 



New DOSPLUS Z80 Extended Disk BASIC 



DOSPLUS gives you more of what you buy an opera- 
ting system for. Speed and reliability without sacrificing 
simplicity and power. If you need extra power without 
extra wait, then you need DOSPLUS! 

Single or double density systems available for Model 
I. Model III DOSPLUS ready for immediate delivery. 

Perhaps the best investment you can make for your 
TRS-80i Listen to what others have had to say about 
DOSPLUS. 

"Overall, DOSPLUS is the fastest operating system 
I have seen..." 

Pete Carr in 80-US Joumal. 

"DOSPLUS... the tietter mousetrap." 

Stewart Fason in 80-Microcomputing 

"On a scale of 1 to10, 1 give DOSPLUS a solid 9." 

Reese Fowler in 80-Microcomputing 
(Model III DOSPLUS review) 



For the BASIC programmer, our features are un- 
matched. For the average businessman, our speed and 
simplicity cannot be beat. 

So, join the satisfied users who have joined 
DOSPLUS. Experience excellence! Experience 
DOSPLUS! 



1) Faster loads and saves 

2) BASIC Reference utility (lines, variables, keywords, printer option) 

3) BASIC Renumber utility (renumber section of text, block text move) 

4) Shorthand features for almost ANY direct command (LOAD, SAVE, etc.) 

5) Shorthand features for editing (listing and editing with single key) 

6) CMD"M" instantly displays currently set variables 

7) Global search and replace in BASIC text 

8) Line printer TAB to 255 

9) OPEN"E" to end of sequential file (for output) 

10) Dl (delete and insert text line) 

11) DU (duplicate text line) 

12) ",R" & ",V" options after LOAD and RUN (files open & save variables) 

13) OPEN"D" allowed (Model II compatible) equal to OPEN"R" 

14) DOS commands from BASIC 

15) Automatic, error-free variable length records 

16) Single step execution with TRON (fabulous for debugging) 

17) CRUNCH (BASIC program compressor) 

18) New TBASIC (tiny BASIC) offers full BASIC commands 

19) TBASIC and DOSPLUS together only use BK of RAM (40K left in 48K TRS-80) 



7 MORE UTILITIES 



1) Single drive copy 

2) Restore (dead files) 

3) Purge (unwanted files) 

4) Cleailiie (destroys data by writing zeros to file) 

5) Transfer (moves all user files from one disk to another) 

6) Spooler (alk)ws printing of text wtiile freeing up the CPU) 

7) Cmnch (Basic program compressor) 



Model I DOSPLUS 

#25-217001 D $99.95 

Model I Double Density DOSPLUS 

#25-2170020 $99.95 

Model III DOSPLUS 

#27-2170030 $99.95 



TERMS: Prices and specifications are subject to change. TSE HARDSIDE accepts 
VISA & MASTERCARD, Certified ctiecks and li^oney Orders. Personal ctiecks ac- 
cepted (takes 3 weeks to clear). TSE HARDSIDE pays all shipping charges (within 
the 48 states) on all PREPAID orders over $100.00. On ail orders under $100 a $2.50 
handling charge must be added. COD orders accepted (orders over $250 require 
25%deposit), there is a $5.00 handling charge. UPS Blue Label and Air Freight 
available at extra cost. 




TSeiHnRDSID€ 



6 South St.,Milford, NH 03055 (603)673-5144 
TOLL FREE OUT-OF-STATE 1-800-258-1790 



SoflSide August 1981 



75 




Video Reverse Modification 



by Edward E. Umlor 

The aim of this article is to give you 
a very inexpensive way to obtain 
reverse video on your S-80. I have in- 
stalled and used other (keyboard ac- 
tivated) reverse video modifications 
and had some irritating results. When I 
sat down to look into the main prob- 
lem created by most modifications, 
the cause of it became clear. This mod 
takes care of the problem, and so far 
has not created any of its own. 

The problem: Popping in and out of 
reverse video as you are inputting data 
or a program. 

The cause: Typing too fast for the 
rollover and striking multiple keys at 
the same time. 

The result: The rollover buffer 
receives sufficient strikes to generate a 
trigger code (turning the video reverse 
on or off) before being cleared. 

Due to the level of my gray matter, I 
am a firm believer in the KISS principle 
(Keep It Simple, Stupid). The first 
question I asked myself was: How do 
we make it really on or off and not in- 



between? The answer was a simple 
Single Pole, Double Throw (SPDT) 
switch. In one position the video is nor- 
mal and in the other it is reversed. 
Well, that took care of the blink prob- 
lem. 

The next question was: How do we 
actually reverse the video? The answer 
was again quite simple — invert the 
signal before sending it out to the 
video. This is accomplished by sending 
it through a nand gate before the final 
output stage. This changes the level of 
the background to the ON values, and 
the level of the characters to the OFF 
values. The point in the circuit that was 
chosen for the modification is the com- 
posite video (alphanumeric + 
graphics) just before the stage where 
the sync signals are added to form the 
final video signal. That way the syncs 
are not affected and video stability is 
maintained. The picture is produced by 
accelerating electrons to the phosphor- 
coated face of the tube. When the elec- 
trons strike, the phosphor gives off 



Hght. The ON value allows electrons to 
flow and the OFF value closes the gate 
to the electrons. 

Everything was okay except for a 
leaning effect caused by reversing the 
video. A full line of CHR$(191) — full- 
pixel graphics character — would cause 
a lean to the right of about 45 degrees. 
A very simple compensation circuit in- 
stalled in the video monitor takes care 
of that problem. Other modifications 
also require a compensation circuit, as 
the problem is a function of the video 
itself. A capacitor, three resistors, one 
transistor, and a one-inch square of 
perforated board (.1" vector board) is 
all that is needed for the circuit. Some 
wire, a piece of foam, and a piece of 
electrical tape will get it mounted and 
installed in the video. 

That, in short, is the modification 
and logic behind it. I wanted to do the 
easiest possible modification consistent 
with stable video operation. To the 
best of my knowledge, the mod 
presented here is the simplest and 



Z41 




R52-C 
R53-C 

R54-C 
R55-C 



Z42^H| Z43^H Z44^H Z45HH Z46HH Z47BH Z48^H 

"I I I I I I I 



R56-1 I- 




Z63I 



:to 



^^ 



B 



Figure 1 



76 



SoftSide August 1981 



easiest to install of any. So let's get into 
the meat of the thing and start off with 
the parts Ust: 

- One 74LS00 dual input quad nand 
gate. 

- One SPDT switch, single pole 
double throw subminiature. 

- Three feet AWG#26, insulated, 
solid hookup wire. 

- One general purpose NPN small 
signal transistor (2N3904 or 
equivalent). 

- One 4.7 microfarad, 16 WV, tan- 
talum capacitor. 

- One 470 ohm, '/4 watt, resistor. 

- One 1.5 Kohm, !4 watt, resistor. 

- One 470 Kohm, Va watt, resistor. 

- One square inch .1" on center vec- 
tor board. 

- One square inch insulating foam Vi 
to Vi inch thick. 

- Two square inches of double sided 
adhesive tape (or tape in position 
with electrical tape). 

The total cost of this parts list should 
be in the neighborhood of $5.00. The 
source of your supplies is strictly up to 
you and shopping around can save you 
up to 50% of the list price. 

The tools you will need are: 

- One Phillips #1 screwdriver. 

- One Xacto or other sharp knife. 

- One pair of small diagonal cutters. 

- One pair of small longnose pliers. 

- One soldering iron; 25 watts is suffi- 
cient. (Don't want to burn the 
board.) 

- One pair of wire strippers or good 
set of teeth. 

- One of rosin core electrical solder. 
AWG#22 wire size is good. (We don't 
want to solderpot the whole circuit.) 

- One damp sponge to keep the tip of 
the soldering iron clean. 

- One small adjustable wrench. 

- One '/4 inch nutdriver. 

Let's do the keyboard changes first. 
Disconnect all cables from the 
keyboard and remove them from your 
system. Now go hide in your workshop 
so the wife won't see what you are 
about to do to that thing you bought 
with the dishwasher money. Turn the 
keyboard over and remove the six 
screws from the bottom with a Phillips 
screwdriver. Press your thumb over the 
label on one of the screws. It will recess 
over the screw hole and can be re- 
moved by using the Xacto knife to cut 
around the edge of the hole. BYE-BYE 
to the warranty. However, by now, all 
Tandy warranties on the keyboards are 
expired since they haven't manufac- 
tured any in 1981. Turn the keyboard 
over and gently lift off the top cover. 
This will expose the keyboard and the 
etch side of the logic board. Gently lift 
up the keyboard, tilting it toward you 



H 


o 




14 \+\ 


1 2 


o 
o 


13 1 






1 3 


12 1 






1 4 


11 1 






1 5 


10 1 






1 6 


9 1 






GRDd 


8 1 











Bend toward each other 

until touching 

then solder together. 



Figure 2 




S1 



Figure 3 



jimi 



(do not put strain on the ribbon cable 
connecting the two boards), and 
remove the five white insulating 
spacers. Lay the keyboard back onto 
the logic board, grasp the edges of the 
logic board (large board below the 
keyboard), and carefully remove it 
from the case. Set the case aside for the 
moment. Turn the assembly over again 
to expose the component side of the 
logic board. 

You will now have to decide where 
you want the switch. I personally do 
not like to put it on the case as it makes 
the removal of the case more difficult. 
I prefer to mount the switch on the 
black faceplate that protects the DIN 
connectors and power switch. This face 
plate is removable, which simplifies the 
drilling and lessens the danger of 
damage to the keyboard. The switches 
will mount in a hole 14 inch in 
diameter, and I recommend drilling the 
hole just above the power-switch hole 
(when the keyboard is reassembled it 
will be below the power switch). The 
switch is mounted horizontally 
(parallel to the long edge) in the hole 
and be sure to run the nut down tight. 
Replace the face plate and make sure 
the switch body does not short out 
(touch) any of the power-switch con- 
tacts. So far, so good! 

Place the keyboard in front of you 
with the ribbon cable toward you on 
the right side. Refer to Figure 1 for the 
following: Locate Z59, then pad A, 
and then, with the Xacto knife, cut the 
etch leaving pad A. Be very careful to 
cut only the one etch; any others will 
have to be repaired. Prepare your 
74LS00 as shown in Figure 2. Pins 1, 
14, and 7 will be soldered to the chip 
used for piggybacking. Locate Z42 and 
solder the 74LS00 on top of it. Strip 
one end of the wire, locate pad B, and 
solder the wire to it. Run the wire to 
the 74LS00 pins 12 and 13, and cut the 

SoftSide August 1981 



wire off long enough to allow you to 
strip and solder the wire to these pins. 
Strip the wire and hook it onto the two 
pins. Strip one end of the remaining 
wire, hook it onto the pins and solder. 
Run the wire to pin 1 (see Figure 3) of 
the switch, cut off, strip, and solder to 
S-1 . Strip one end of the wire, solder to 
74LS00 pin 1 1 , run to the switch pin 3 , 
cut, strip and solder to S-3. Locate pad 
A and connect to switch pin 2 in the 
same manner. You have now com- 
pleted the keyboard wiring and the 
schematic in Figure 4 is now the correct 
road map. If you have a tech manual, 
page 108 should be corrected. You will 
also have a little more than a foot of 
wire left, and it will be used to wire the 
compensation board into the video. 

Time to do a final inspection of your 
work for solder bridges (the uninten- 
tional soldering together of conductors 
or pins), unsoldered joints, and routing 
of the wire so as not to interfere with 
assembly. EVERYTHING IS OK!!!! 
FANTASTIC!!! Now, let's put it all 
back together. Turn the logic board 
over, being careful of the ribbon cable, 
and set it aside within easy reach. Place 
the bottom half of the case in front of 
you with the cutouts toward the back. 
Be sure the white spacer (rigid plastic) 
is on the post on the right side. Gently 
lower the logic board back into the 
case, making sure it is fully seated. The 
switch you have installed might in- 
terfere with the bottom of the cutout. 
If it does, cut out the bottom of the 
cutout with the Xacto knife or file until 
proper clearance is obtained. Replace 
the five insulating spacers, two on top, 
two on bottom, and one on right side. 
Before we close up the keyboard. Jet's 
see if it is working. Hook up the power 
cable and the video cable to the 
keyboard. Turn on the video and then 
the keyboard. If you can hardly see 
continued on next page 
77 



Reverse Video 
Modification 

continued from previous page 

anything on the screen, flip the switch 
you installed. You should have normal 
video at your normal viewing level. 
Now flip the switch to the reversed 
position and turn up your brightness. 
The brightness and contrast will have 
to be adjusted each time you go from 
normal to reversed or back. This is 
normal operation and you can finish 
assembly of the keyboard. Turn off 
and disconnect everything. Carefully 
install the top half of the cover, being 
sure the red LED is lined up with the 
hole in the cover. 

Turn them over and, holding the two 
halves together with one hand, find a 
middle-length screw, insert in the side 
hole, and tighten it with a screwdriver 
until snug. You can let go now and in- 
stall the rest of the screws. The short 
ones go to the front, middle length to 
the sides, and the longest ones to the 
back. Snug the screw only; you are 
working with plastic and the screw 
holes will strip out easily. 



If you are only going to use your 
system for business or word processing 
and not run any games with graphics, 
you can stop right here. However, it 
you are going to do anything else, you 
will have to compensate your video. 
First you make your little circuit on the 
one square inch of vector board. One 
suggested layout is seen in Figiire 5. In- 
sert the transistor into the board and 
bend the legs in the direction you want 
them to hook up to the other com- 
ponents. There should be enough lead 
length to keep you from using any 
wire. Preform your components and 
insert them into the board. You might 
want to piggyback the capacitor on the 
470K ohm resistor before assembling. 
This is the area where you can be very 
creative — just be sure to observe the 
polarity of the capacitor and the base, 
emitter, and collector of the transistor. 
See Figure 6 for a schematic of the cir- 
cuit. Once you have completed this lit- 
tle task you are ready to play the mad 
scientist again. Sneak your video into 
your operating room and prepare 
yourself to operate. Place the video 
face down on the operating table and 
using the V* inch nutdriver, remove the 
five screws that secure the back cover. 
There are four of them recessed at each 
corner, and one right out in the open 
by the power cord. Gently lift the cover 
off, feeding the power cord through 
78 




Z30 




Cut 

etch 

- I - 




13 



12 




N 



SI 



Figure 4 



GRD 



+ 18V 



-si 

o 




I___vr^____I 



^- 









■"-w 




+ 






470K 













4.7 mF 
Figure 5 



+ 18V 



16V 
4.7 mF 



R28 

comm. 

end 



1 o-L^V\AAA 



470K 

1/4 W 



All resistances are in ohms. 
All capacitances are in 
microfarads. 



Figure 6 




R28 
o opp. 

^ end 



SoftSide August 1981 




the hole, and set the back cover off to 
one side. Use Figure 7 for the instal- 
lation of the compensation board. 
Now set the video on its top with the 
face away from you. Gently pull the 
circuit chassis toward you to expose the 
etch side of the circuit board, until you 
can reach the connections needed. 
Lower the back until it supports itself 
on the chassis guides. These guides are 
plastic and will not stand a lot of stress. 
It is easier to do these next steps 
without the compensation board being 
permanently mounted. Place the board 
in the position you will use permanent- 
ly. Measure, cut, and strip the wires for 
+ 18V, ground, and pads 1 and 2. 
Solder these onto the compensation 



board. Now locate and remove R28 
from the video board. Mount the com- 
pensation board permanently on the 
video circuit board and solder the four 
wires to their proper location. Lift the 
back of the chassis and gently push it 
back into its proper position in the 
video unit. This completes the wiring 
required for the video compensation. 
Place the video back on its face, feed 
the power cable through the proper 
hole and seat the back cover in correct 
position. Replace the five screws and 
snug them. Once again you are work- 
ing with a soft plastic, so be careful not 
to strip out the screw holes. NOW IT 
IS TIME TO CLEAN UP THE 
OPERATING ROOM AND TAKE 



YOUR BOWS. YOU HAVE COM- 
PLETED THE MODIFICATION! 

Set up your computer system again 
and check to see that everything 
operates properly. Print a couple of 
lines of CHR$(191) to be sure the lean 
is out. Some of the older videos do not 
have as much contrast as the newer 
ones. This is something other than 
compensation and the video will have 
to be adjusted. 

And now as the great video in the 
sky sinks slowly in the west, your ole 
buddy bids you adieu until the next 
great spurt of incredibly dump genius. 
SO LONG AND BOY IS "METEOR 
MISSION 11" GREAT IN REVERSE 
VIDEO. Q 



Games from BIG FIVE will 
turn your computer into a 



SUPER NOVA 



© 




■Huge ASTEROIDS have invaded the 
galaxy' Your mission is to destroy them 
and the alien saucers before they de- 
stroy you!" Our #1 top selling game' 

$15.95 16K Mod I or HI 



TRS-80™ 
HOME ARCADE 

AHACK FORCE'' GALAXY INVASION'' 



m 


r 






■ ■ ■ ■ B ■ ■ 

■ ■ ■ ^B ■ M 
^B ■ ■> ■ ■ ■ 

c 




^ 







■'Eight alien ramshipsaie warping down 
toward yoLir destroyer ship. You must 
shoot them down quickly before they 
ciush you' ■ With sound' 

$15.95 16K Mod I or III 




"The newest and most exciting In- 
vaders-type game yet' Smooth sound 
effects, sharp graphics, and the Flag- 
ship alien from Super Nova combine 
to make this our finest TRS-80 game' ' 

$15.95 16K Mod I or III 




TSeHPIRDSIDC 



6 South St.Milford. NH 03055 (603)673-5144 
TOLL FREE OUT-OF-STATE 1-800-258-1790 



SoftSide August 1981 



79 




Lemonade or Champ agne 



Will Hagenbuch is the author of 
business and utility programs such as 
"File Manager 80", "Accounts 
Receivable", and "Utility". This is the 
final installment of our serialization of 
his book Lemonade or Champagne, a 
guide to business software. 




by Will Hagenbuch 

Trust me that, as we proceed 
through this and the next sections, you 
will find out that this information on 
how to "OPEN" a random file is real- 
ly all you need to know! What we will 
be doing, in this Section and the next, 
is introducing you to File Manager-80, 
an effective alternative for disk I/O 
handling. However, before we get in- 
volved with File Manager-80, let's 
discuss some of the other aspects of 
systems development using disk files. 

RANDOM ACCESSING 

Let's assume for the moment that 
you have, or will have, the ability to 
use random accessing techniques to 
fetch and write records from and to a 
file. It would naturally follow that you 
would need to know "which" record. 
This is quite easy if you have a listing 
of the file and it contains the number 
of each record, but what if you don't 
have such a listing? Well, you might 
consider accessing every record on the 
file with a FOR. . . NEXT loop and in- 
specting the data content of the file to 
80 



see if that is the one you wanted. 
However, this is no more efficient than 
a Sequential File, is it? 

The determination of "which" 
record is best done by the use of an In- 
dex. An Index might be described as a 
pointer to "which" record on your 
random access file contains the infor- 
mation that you want. There are two 
methods of creating such an Index: 
either by using the FOR . . . NEXT 
loop to read all of the records from 
your random file one time, or by 
creating and maintaining a separate 
"Index" file (which is normally a Se- 
quential File). In either case, the file 
which is the basis of your Index will be 
read into a memory array which we will 
call your Index Table. Naturally, you 
must have included a dimensioned ar- 
ray in your program to accommodate 
this Index Table which must include, as 
a minimum, the Data Element which is 
to be your "key" for locating your 
record. This "key" may be either an 
alphanumeric or numeric element and 
you must dimension accordingly — 
and you will need a sufficient array size 
so that there is one bucket for every 
record in your file, including any file 
size expansion that you may have in the 
future! 

As an example, let's say that you 
have a random file of customers. At 
the time each of these customers was 
placed in the file, a unique number was 
assigned to each customer. This 
Customer Number is the Data Element 
that will be used as the "key" for ac- 
cessing the customer record. If the 
Customer Number is a part of the 
customer file it will need to be split off 
(using the FOR. . . NEXT loop) to 
create an Index Table each time a pro- 
gram requiring random access of the 
file is run. Similiarly, if the Customer 
Numbers had been maintained in a 
separate file they would also be re- 
quired to be accessed each time the 
program is run, but this would appear 
to be the more prudent way since fewer 
bytes of data would need to be accessed 
in order to build the Index Table. In 
either case you would place the 
Customer Number into a one-element 
array that had been diminsioned to ac- 
cept it. 

Now that the Index Table of 
Customer Numbers has been establish- 
ed, it is a simple procedure to relate the 
Customer Number to the physical 
record location for that customer's 

SoflSidc August 1981 



record. By searching the table with the 
desired Customer Number and finding 
a match (equal comparison) on the Nth 
record, we know that the customer 
record is the Nth record in our random 
access file. 

The searching of the Index Table is, 
however, an art unto itself. If we were 
to insure in our program which creates 
customer records, that all Customer 
Numbers were assigned sequentially in 
ascending sequence, we could use a 
Binary Search to locate the desired 
Customer Number very quickly. A 
Binary Search is a table search which 
"bisects" the table entries. In other 
words, if we were to compare the 
desired Customer Number to the 
"middle" entry in the Index Table of 
customer numbers and that com- 
parison told us that the desired number 
was less than the middle entry, we 
would have effectively reduced further 
searching by one-half. Obviously, the 
Customer Numbers between the mid- 
dle and the top (last number) of the ar- 
ray will not match the desired number. 
So, let's look at the bottom half of the 
Index Table. See Figure 3-1. 

Our next comparison would be at the 
first Index Table entry (or the last entry 
if the key we are searching was "high" 
to the middle). If our key is "low" to 
the first entry (or "high" to the last en- 
try) we know immediately that the 
number we seek is not on the table. Ob- 
viously, whenever an "equal" condi- 
tion occurs, we have found our number 
and, consequently, our pointer for ran- 
dom accessing of the customer file. 

If the second comparison (the one to 
the bottom of the Index Table) was 
"high", we know that our key number 
ranges somewhere between the first 
and middle numbers on the Index 
Table. Therefore, we would compute 
the middle location between the first 
and middle Index Table entries and do 
the third comparison against that en- 
try. Again, if unmatched we would 
continue the bisecting until the number 
was either found by an equal com- 
parison or determined to not be on the 
Index Table. The "not found" condi- 
tion is determined when no more 
bisecting is possible and an equal con- 
dition has not been found. 

Figure 3-1 provides an example of a 
Binary Search routine which might be 
included as a program subroutine. 
Follow the code in this example so that 



400: 'Binary Search Subroutine 

Sets SW = if "Found" else 
SW=1 if "Not Found" 

Variable "SR" is Search Key 

Variable "T" is total number 
of entries on table 

Variable "LN" must have 
previously been dimensioned 

Variable "XL" is "Low" posi- 
tion of table to be searched 

Variable "XH" is "High" 
position of table to be searched. 

Variable "XM" is computed 
"Middle" of table. 
410: SW = 0: XL=1:XH = T: IF 
SR< LN(XL) OR 
SR> LN(XH) THEN 470 

'Set up search controls and exit 
if key not on table 
420: IF SR = LN(XL) OR 
SR = LN(XH) THEN 460 

'Exit if key matches first or last 
entry 

430: XM = INT((XH + XL)/2): 
IF XM = XL OR XM = XH 
THEN 470 

'Bisect remaining portion of 
table and exit if table exhausted. 
440: IF SR< LN(XM) THEN 
XH = XM: GOTO 430 

'Set control to continue search 
in "lower" part of table 
450 IF SR>LN(XM) THEN 
XL = XM: GOTO 430 

'Set controls to continue search 
in "upper" part of table 
460: RETURN 'Exit with 
"FOUND" condition 
470: SW=1: RETURN 'Exit 
with "NOT FOUND" condition 

FIGURE 3-1 



you thoroughly understand its impHca- 
tion. Your search will work extremely 
fast with this searching method 
because you will be looking, in the 
worst case, at only about one-eighth of 
the Index Table. 

However, if your Index Table was 
not in sequence, you could not use the 
Binary Search and would be forced to 
use the slower method — the Sequen- 
tial Search. 

In the Sequential Search, we must 
look at every entry in our Index Table, 
or at least until we find our match. We 
do this with the FOR. . .NEXT loop 
routine. The fastest method of per- 
forming this search is to break out 
when (and if) a match is found. If you 
are going to employ the "break-out" 
search loop, be sure that it is not a 
nested FOR... NEXT loop (inside of 
another FOR... NEXT loop) since you 
will leave an "unsatisfied NEXT" and 
that's a "no-no". An example of the 
"break-out" Sequential Search is pro- 
vided as Figure 3-2. 



400: 'Sequential Search 


tains table entries 


Subroutine 


410: FOR I = 1 TO T 'Set loop to 


Variable "I" contains 


search entire table 


"Found" location or zero of 


420: IF SR = LN(I) THEN 


"Not Found" 


RETURN 'Exit if "Found" 


Variable "T" is maximum 


Variable "I" contains 


number of table entries 


"Found" location 


Variable "SR" contains 


430 NEXT I 'Keep looking until 


Search Key 


table exhausted 


Variable "LN" is previously 


440 1 = : RETURN 'Set "I" 


dimensioned array which con- 


zero if "Not Found" 


FIGURE 3-2 I 



Of course, in either case, your pro- 
gram will have to handle the situation 
of a return with a "not found" condi- 
tion as indicated by a zero value in the 
Index Table pointer; "XM" in Figure 
3-1 or "I" in Figure 3-2. 

OPTIONAL FILE STRUCTURES 

To get the maximum use out of your 
disk storage space, you should have a 
working knowledge of how you might 
organize files to best serve your needs. 
It often happens that if you are limiting 
yourself to a Fixed Format file struc- 
ture, you might need to create several 
files, and consequently require several 
buffer allocations, when one Multi- 
Format file would do the job. 

A Multi-Format file, for our pur- 
poses, is a file that contains more than 
one format of records, or records 
which have more than one format. As 
an example, you may have reason to 
require that a file contains a "header" 
record of one format and some 
variable number of "trailer" records in 
another format. We will be using the 
term "header" to define any format 
which is the first of a group of related 
records; the term "trailer" will refer to 
the remainder of the records in that 
group. In this example, we will refer to 
the structure, as a "Dual Format" file. 
Structure A, shown as Figure 3-3, pro- 
vides a pictorial layout of the "Dual 
Format" file structure. 



In Figure 3-3, we see a typical ap- 
plication of transaction entry employ- 
ing the "Dual Format" file structure 
concept. The first record on the file 
contains such one-time information as 
the Transaction Batch Number, Date 
of the Batch, and Identification of the 
Operator who entered the information. 
This format appears only one time on 
the file. 

The second format is that of the 
transactions which make up the batch. 
One record is used for each transaction 
and the number of this transaction for- 
mat that may be placed on the file is 
limited only by the physical size of 
your recording media (disk or tape). 

The second example of Multi- 
Formatted records will be called the 
"Variable Format". In this type of 
structure, we use two different formats 
in the same record; and, of course, the 
number of records that can be stored in 
a file is limited only by your physical 
storage capacity. Figure 3-4 provides a 
pictorial layout of Structure B, the 
"Variable Format" record. 

In the "Variable Format" structure, 
the number of trailers for each header 
must be specified. Because both the 
header and the specified number of 
trailers must be contained in a single 
sector of disk (255 or 256 bytes, de- 
pending on the DOS you are using), the 
aggregate size (bytes) of the header 
plus the number of specified trailers 

continued on next page 









Record 
#1 


Transaction 
Batcin Number 


Date 
Prepared 


Operator 
Identification 












Records 
#2-n 


Date of 
Payment 


Customer 
Account 
Number 


Amount of 
Payment 






Structure "A" — Dual Format 
FIGURE 3-3 







SoftSide August 1981 



81 



Lemonade or 
Champagne 

Continued from previous page 

cannot exceed the physical restriction 
placed upon you or your DOS. 

In Figure 3-4, we see a typical ap- 
plication of transaction detail (trailer 
records) applied to a customer record 
(header). In this case, we have 
established a maximum of three detail 
records per header record. It could 
have been more or less depending upon 
our requirements — as long as the ag- 
gregate size of the header and the max- 
imum number of trailers for that 
header does not exceed the physical 
block size (255 or 256, depending on 
the DOS we use). Note that this file 
structure is called "Variable Format" 
because the trailers may or may not 
contain information. This does not 
mean that unused trailers do not take 
up space — they do. But, whether or 
not they actually contain information 
is a matter for your program to deter- 
mine. 

It might be noted, also, that in order 
to optimize file storage space, if the ag- 
gregate records size is less than one- 
half of the block size (255 or 256) the 
block may contain two (or more) of 
these "Variable Format" structure 
records. However, this "blocking" of 
records is only rhetorical since, if you 
are using File Manager-80, this is an 
automatic feature. 

SECTION IV 
SOFTWARE SOLUTIONS 

In the first three sections we de- 
scribed the magnitude of the effort 
necessary to professionally develop a 
microcomputer system. In this final 
Section we could like to offer some 
"software solutions" to assist you in 
accompHshing these tasks. 

Like the proverbial barber who 
needed a haircut, the programmer 
often fails to utilize the power of the 
computer for his own benefit. We are 
so intent on solving the problems of 
others that we often fail to solve our 
own problems first. We spend endless 
hours in debugging or documenting a 
program when the computer at our 
fingertips could have done the job for 
us in a fraction of the time — and with 
guaranteed accuracy. 

Would you believe that there are 
those among us who still use an old- 
fashioned typewriter to prepare 
systems documentation? Why not con- 
sider using your computer — it is faster 
and easier to use if you have a word- 
processor / text-editor program that is 
easy to use. 
82 





HEADER 










Customer 
Number 


Customer 
Name 


Customer 
Address 


Customer 
Address 






TRAILERS 










#1 


Invoice 
Number 


Payment 
Date 


Payment 
Amount 














#2 


Invoice 
Number 


Payment 
Date 


Payment 
Amount 












#3 


Invoice 
Number 


Payment 
Date 


Payment 
Amount 








Structure "B" — Variable Format 
FIGURE 3-4 







PROGRAMMING AIDS 

There are many ways that your com- 
puter can assist your programming ef- 
forts. We have put five of these "UtiH- 
ty" functions into one program. These 
utilities include Program Search, 
"Global" Program Modification, Line 
Number Cross-Reference, Edited Pro- 
gram Listing, and Program Compres- 
sion. 

— Program Search 

This Utility will search your program 
for every occurrence of any string of 
alphanumeric characters you specify. 
It will then provide you with the line 
numbers of those programs lines which 
contain that string of characters. 

Any of you who have ever searched 
through a lengthy program Hsting 
looking for some illusive piece of code 
know what a time-consuming battle 
this can be — and you are never quite 
sure that you have found all the occur- 
rences. Incidentally, the string that you 
specify as a search key may be any 
length, so you are not limited to sear- 
ching for a two-character variable or 
an integer value line number. 

— "Global" Program Modification 
Did you ever want to change 

something in a program? Not just one 
occurrence, which you could do simply 
with BASIC EDITOR, but every oc- 
currence. This is what we mean by 
"Global". It changes every occurance 
throughout the program. 

You may specify up to ten such 
changes each time you run this Utility 
and all alphanumeric strings of 

SoftSide August 1981 



characters that you specify will be 
changed to whatever other strings of 
characters you specify (or to "null" if 
you do not specify a string). The length 
of either the "FROM" or "TO" 
specifications is immaterial. 

This can be a "dream" Utility if you 
should need to change something 
throughout a program — like a 
variable name, for example. 

— Line Number Cross-Reference 
Did you ever find yourself tracing 

through the logic of a program and say 
to yourself, "I wonder how it got 
there?" This Utility will answer that 
question for you by selecting each line 
containing a "GOTO", "GOSUB", 
"NEXT", "ELSE", or "RESUME" 
that causes a program transfer to 
another line and printing or displaying 
on the video screen (your option) the 
program line and each of the program 
transfer line numbers. 

— Edited Program Listing 

I don't know about you, but my pro- 
grams are not a very pretty sight after 
debugging is completed. I tend to make 
rather long code lines, especially where 
lines contain compounded "IF" 
statements. I also have the habit of 
throwing in comments (remarks) in a 
rather haphazard manner. To me, this 
is quite natural because, when I am 
coding, the logic is of utmost impor- 
tance, not the structure. However, 
when I have completed the program, I 
sometimes want (or need) a "pretty" 
Hsting. 



This Utility module will make struc- 
tured listings of your otherwise messy 
code. All remarks will be set off to the 
right side of the listing, all subroutines 
will be so identified, spacing lines will 
be inserted between program segments, 
and instruction lines will be broken 
down to one instruction per print line. 
With this module, your program will 
not be altered. 



— Program Compression 

What the Edited Program Listing 
module does, the Program Compres- 
sion module un-does. Program Com- 
pression will "crunch" your program 
into the minimum memory require- 
ment by stripping out all remarks, all 
blank spaces, all "NEXT" variables 
and all line-terminating quote marks 
and then squeeze as many instructions 
into one line as possible. 

Of course, the Compression module 
is smart enough to not alter the con- 
tents of strings and to preserve line 
numbers that are "addressed" 
elsewhere in your program, including 
"REMarks" Unes you may have ad- 
dressed. But it will otherwise strip the 
program to its barest essentials to 
reduce memory requirements, reduce 
LOAD and RUN times, and make it a 
"bear" for someone else to modify 
and claim ownership! 

By the way, a program which has 
been Compacted with this module can 
be expanded with the Edited Program 
Listing module, at the expense, of 
course, of all REMarks statements and 
blank spaces which have been lost. 



FILE MANAGER-80 

If your Disk Operating System/Disk 
BASIC manual leaves you cold in its 
discussion of Disk Files, then you may 
want to consider File Manager-80 as an 
alternative way to create, code, and 
document Disk Files. The reason is 
that File Manager-80 is an Input/Out- 
put Control System (IOCS) that can 



Atari One Liners 



i GRAPHICS lf:S=RND(t)t234iP0KE 708,S 
:COLOR 1:PL0T S/6,0:DRAMTQ S/6,19:S0(I 
MD 0,S,12,10:FQR L=l TO 45:NEXT L:RUN 



David Simmons 
Redondo Beach, CA 



make those file structuring and ran- 
dom accessing problems go away 
because it writes your file Input/Out- 
put instructions for you! And, as a by- 
product, will produce a Dictionary of 
Data Elements and Record Layouts 
that are so vital to your system support 
documentation. 

We have previously discussed several 
file structures (Dual Format and 
Variable Format) that might be 
employed when a plain vanilla Fixed 
Format record is not suitable. File 
Manager-80 will accommodate all 
three of these file structures. In addi- 
tion, your worries (if you have any) 
about optimum record blocking and 
those pesky little algorithms you need 
to find sub-records are taken care of 
automatically by File Manager-80. 

In summary. File Manager-80 is an 
IOCS for the S-80 that will make pages 
7-37 through 7-75 of your Disk 
Operating System Manual go away. As 
we said earlier, if this part of the 
Manual left you cold, you might find 
that File Manager-80 is the solution. 
Or, even if you have mastered file ac- 
cessing. File Manager-80 may appeal to 
you as a time-saving programming and 
documentation tool. 



DOCU-WRITER 

Docu-Writer is a text-editor and 
word processor designed for use by the 
programmer. Why? Because text- 
editing is performed in the BASIC 
EDITOR, an Editor familiar to BASIC 
programmers. In addition, Docu- 
Writer is a complete "system" with its 
own initialization program which 
enables you to "tailor" the program to 
your particular printer, memory 
capacity, and number of disk drives. 

Docu-Writer performs the word 
processor functions with only five con- 
trols codes; "#", "<>", "C", "@", 
and the up-arrow. With only these few 
control codes, Docu-Writer is indeed 
one of the easiest-to-use word proc- 
essors available that still provides a 



full range of operations such as 
hyphenation, right-margin justifica- 
tion, line centering, page titHng and 
numbering, variable line width and 
page length, "global" text modifica- 
tion, variable data insertion in text at 
print time, and UPPER/LOWER 
CASE WITHOUT HARDWARE 
MODIFICATION (provided your 
printer can print upper /lower case.) 

Docu-Writer has one built-in short- 
coming. It will not automatically write 
your program and systems documenta- 
tion for you (you still have to hit the 
keys), but with all of this versatility, it 
will sure make your job easier. And, by 
the way, if by chance you write for 
profit, Docu-Writer will keep track of 
the number of words in your text files 
and make this information available to 
you. 

SUMMARY 

In this series we have attempted to 
do several things — not the least of 
which was to make you cognizant of 
the versatility and usability of File 
Manager-80, Docu-Writer, and Nepen- 
the Utilities as development and 
documentation tools for the System 
Developer. In addition, we have: 

— Introduced you to the magnitude 
of the problems in "professionally" 
developing a computer system — micro 
or otherwise; 

— Offered some insight into the 
methodology of creating "lasting" 
support documentation for computer 
appUcations; 

— Covered, albiet cursory, the ac- 
cessing of random file records by a 
couple of techniques; 

— Provided a couple of alternatives 
to the plain vanilla Fixed Format file 
structure; 

— Described a viable alternative to 
the "ho-hum" of writing file In- 
put/Output instructions and documen- 
tation; and, 

— Presented, for your considera- 
tion, several "software solutions" 
available to the System Developer. (3 



^■Atf^^^^^^^"^ ^''^^^^B ^1 


Diskettes for Apple II 
and TRS-80 

1 to 5 diskettes only $2.50 each 
5 or more only $2.25 each 

Write to: Simon Warner 

1364 Grant Street 
Lincoln Park, Ml 48146 



SoftSide August 1981 



m 




VARPTR Used 



by John T. Phillip, M.D. 

The second of three articles on the S-80 
VARPTR function. 

SUPER GRAPHICS 

Now that we have VARPTR under 
control, let's use it for something 
useful — like "packing" a string with 
graphics characters or a Machine 
Language subroutine. First, let's look 
at S-80 graphics in general, then 
"packed string" graphics. 
Later, we'll "pack" strings with 
Machine Language. 

For graphics, the S-80 screen is 
divided into a grid of 128 by 48 
graphics points, called "pixels". Turn- 
ing one pixel at a time on with SET or 
off with RESET can draw pictures, but 
the process is slooow. For PRINTing 
characters, the screen is divided into 16 
lines of 64 characters. Each of these 
1 ,024 screen positions is numbered to 
1023, and may be written to by the 
command "PRINT @ number". Any 
character position may have an 
alphanumeric or "graphics character" 
PRINTed in it. The "graphics 
characters" result when the pixels that 
make up a character position are ht, so 
a graphics character takes up one full 
"PRINT @" position, and is two pix- 
els wide and three pixels tall. Each of 
the possible combinations of the six 
pixels "on" and "off" is identified by 
a number. . . from 128 (all pixels 
"off") to 191 (all pixels "on"). A Ust 
of the 64 graphics characters can be 
seen by RUNning the following "one 
liner" (you'll have to hit [BREAK] to 
get out of it): 



10 CLS: FORI = 128T0191STEP8: 
FORX = 0TO7: A$ = STR$(I-l-X): 
PRINTLEFT$(A$,4);": 
";CHR$(I + X);" ";: NEXTX: 
IFI=184THENFORA = 
OTOISTEPO: NEXTA: 
ELSEPRINT" ": NEXTI 



The S-80 screen is "memory 
mapped", which means that each of 
the character positions is represented in 
memory by one byte. Whatever is put 
into one of those memory locations is 
placed on the screen by the computer's 
circuitry. We don't actually write on 
the screen, but writing to the screen 
memory has the same result, which 
84 



gives us an easy way to get the graphics 
characters onto the screen. We can just 
POKE them into the screen memory. 
Huh?? What's a POKE? 

POKE and PEEK are BASIC'S way 
of directly altering the contents of a 
memory location. All we have to know 
is its address in decimal. Try this: in the 
S-80 command mode type PRINT 
PEEK (27648) [ENTER]. This com- 
mand looks at memory location 27648 
and PRINTS its contents on the screen. 
Now type: POKE 27648, 191: PRINT 
PEEK (27648) [ENTER]. Look at 
that!! POKE put a 191 into location 
24876. You've just changed the con- 
tents of a location in memory. What 
power!! 

Screen memory extends from ad- 
dress 15360 to 16383 (1,024 bytes). 
Every time we POKE the number of a 
graphics character into one of those 
locations, it appears somewhere on the 
screen. POKE 15360,191. A block of 
six pixels will appear in the upper left- 
hand corner. POKE anywhere you 
like, but stay on the screen (between 
memory locations 15360 to 16383). 
Each line of the display has 64 
character positions, so the first line of 
the display extends from memory loca- 
tion 15360 to 15360 -t- 63 (remember, 
the 64 character positions are to 63, 
not 1 to 64). The second line starts at 
15360 -I- 64, and so on. 

Let's see how it works by POKEing 
a simple picture of the "Enterprise" 
onto the middle of the screen. Type 
and RUN: 



10 CLS 

20 POKE 

15769,128 

15771,143 

15773,143 

15775,159 

15777,168 

15779,188 

15781,188 

30 POKE 

15833,128 

15835,190 

15837,188 

15839,190 

15841,188 



15768,128: POKE 
: POKE 15770,130: 
: POKE 15772,143: 
: POKE 15774,175: 
POKE 15776,143: 
: POKE 15778,188: 
; POKE 15780,188: 
: POKE 15782,188 
15832,128: POKE 
: POKE 15834,136: 
POKE 15836,189: 
POKE 15838,188: 
POKE 15840,189: 



POKE 
POKE 
POKE 
POKE 
POKE 
POKE 



POKE 
POKE 
POKE 
POKE 



Oops! That isn't right. The bottom 
line of the picture is out of place. To 
fix it, change Hne 30 to: 



30 POKE 15836,128: POKE 
15837,128: POKE 15838,136: POKE 
15839,190: POKE 15840,189: POKE 
15841,188: POKE 15842,188: POKE 
15843,190: POKE 15844,189: POKE 
15845,188 



There. . . that's better. We moved 
the bottom half of the picture four 
spaces to the right by adding four to 
each memory location. It's easy to get 
the memory addresses confused and 
get a picture that's not straight. POKE 
graphics are also slow, because BASIC 
has to interpret each POKE command 
before it can be executed. 



There is a better, faster way to get 
graphics onto the screen. If we define a 
string in a program like A$ = 
"ABCDEFGHIJKLMNOP", and 
then PRINT A$, all the letters are 
PRINTed together, not one letter at a 
time. The computer stores and 
PRINTS the entire string as a unit. If 
we put graphics characters into a string 
rather than letters, we could PRINT 
them all at once instead of having to 
POKE them onto the screen one at a 
time. Sounds like a good idea, so let's 
try it: 



10A$ = "128,128,130,143,143,143, 
175,159,143,168,188,188,188" 
20 PRINT@448,A$ 



Hmmmmm. . . it didn't work. The 
S-80 thought that we wanted the 
numbers PRINTed. We can tell it that 
we want those numbers to represent 
graphics characters by typing the 
number in the form CHR$ (X), which 
stands for CHaRacter String (number 
X): 

10 A$ = CHR$(128) -I- CHR$(128) + 
CHR$(130) + CHR$(143) -f 
CHR$(143) + CHR$(143) -l- 
CHR$(175) -I- CHR$(159) -I- 
CHR$(143) -I- CHR$(168) -I- 
CHR$(1 88) + CHR$(1 88) + 
CHR$(188) 
20 PRINT@448,A$ 

Now the computer understands that 
we want graphics, and, since A$ was 



SoflSide Augusi 1981 



defined before PRINTing, it PRINTs 
all the graphics characters at once — or 
nearly at once. Verrrry fast!! 

We can "PRINT @" any character 
position on the screen, but if you 
PRINT too close to the right edge of 
the screen, the graphics will "wrap 
around" to the next line. There are no 
"end of line" or "edge of screen" 
boundary markers in the screen 
memory. It's just 1,024 consecutive 
bytes of RAM. The end of the line and 
screen are functions of the video 
monitor, not the screen memory. 

If we define A$ to be the graphics 
characters that make up the first line of 
the "Enterprise", and B$ as the 
graphics characters that make up the 
second line (I'll leave the creation of B$ 
to you as an exercise), we can PRINT 
the whole picture by: 

30 PRINT@448,A$: 
PRINT@448 + 68,B$ 



Each line of graphics characters gets 
PRINTed separately, and we have to 
figure out the offset for the second line 
so it will Hne up properly with the first. 
There is a way to PRINT the whole pic- 
ture at once, by using three of the cur- 
sor control codes. The cursor is the 
character on the screen that overUes the 
position where the next character will 
be PRINTed. The "cursor control 
codes" — CHR$(24), CHR$(26), and 
CHR$(27) — don't PRINT anything, 
but they MOVE the cursor so that the 
next character PRINTed is in a dif- 
ferent place. CHR$(24) moves the cur- 
sor one space to the left (backspace), 
CHR$(26) moves the cursor one line 
down, and CHR$(27) moves it one line 
up. We can PRINT the "Enterprise" 
by PRINTing the first line, using the 
control codes to move the cursor one 
line down and 1 1 spaces to the left, and 
then PRINTing the second line. That 
makes our picture of the "Enterprise" 
37 characters long: 15 graphics 
characters for the first line, 12 control 
codes to move the cursor down and 
back, and 10 graphics characters for 
the second line. 



That's a lot of "CHR$( )-^" to 
type, since you have to type "CHR$ 
( ) + " once for each graphics character 
and control code. A faster method is to 
put the graphics characters in a DATA 
statement, then use a FOR/NEXT 
loop to READ the DATA, put each 
character into a CHR$(X), and then 
addtheCHR$(X)to A$.: 



10CLS:A$ = " " 
20FORI = lTO37: 



READX: 



A$ = A$ + CHR$(X): NEXT I 

30 DATA 128,128,130,143,143, 

143,175,159,143,168,188,188,188, 

188,188,26,24,24,24,24,24,24,24, 

24,24,24,24,128,128,136,190,189, 

188,188,190,189,188 

40 PRINT@448,A$ 



There's the "Enterprise" again. . . 
without having to type "CHR$( )-i-" 
37 times. We can PRINT the "Enter- 
prise" anywhere on the screen we 
want, and it's fast, about as fast as it's 
going to get without Machine 
Language. Because the computer has 
A$ predefined, the only command 
BASIC has to interpret is PRINT, and 
that only once. 

The last enhancement to the process, 
the one that turns "print string" 
graphics into "Super Graphics", 
doesn't speed up the graphics at all. 
Those DATA statements use a lot of 
memory. We know that our picture is 
just 37 bytes long, but the DATA state- 
ment to produce it is 135 bytes long. . . 
not to mention memory used by the 
FOR/NEXT loop. Each three-digit 
number in a DATA statement requires 
four bytes for storage: one byte for 
each digit, and one byte for the comma 
that separates the digits. 

How can we save memory, and still 
get the same result? We can store the 
numbers for each of the graphics 
characters, 128 - 191, and control 
codes, 24, 26, and 27, in one byte. We 
were POKEing graphics characters into 
screen memory earUer, why not POKE 
them into a string instead?? 

Why not, indeed? First, we need a 
string to POKE into. It has to be 37 
characters long, because we need room 
to put the 37 graphics characters and 
control codes of our picture. It doesn't 
matter what characters are in the 
string, because they will be replaced by 
the characters we will POKE in. 



10 A$ = "///////37/slashes/in/ 
here////////////" 



NOW we need VARPTR, since we 
can't POKE characters into A$ until 
we know where A$ is in memory. The 
starting address of A$ is stored in the 
memory location pointed to by 
VARPTR (AS) + 1 (the low order byte 
in decimal) and VARPTR (A$) -I- 2 (the 
high order byte in decimal). To convert 
the address to decimal (the POKE com- 
mand requires that addresses be in 
decimal) we add the low order byte to 
256 times the high order byte: 

SoftSide August 1981 



20 I = VARPTR(A$): J = PEEK(I -I- 1) 
-t-256*PEEK(I-l-2) 



"J" contains the starting address of 
A$ in decimal, and the 37 characters 
(slashes) of A$ are stored in memory 
locations "J" to "J -1-36" (remember 
that "J" is the FIRST memory loca- 
tion of the string, so the 37 bytes are 
from "J" to "J +36", NOT "J -f-37). 
We add line 30, the DATA statement 
containing the 37 characters that make 
up the "Enterprise", and all we have 
to do is READ the graphics characters 
from the DATA statement, and POKE 
them into the string, replacing the 
characters already there: 



25 FORK = JTOJ + 36: READX: 
POKEK,X: NEXTK 



RUN the program. Type PRINT A$, 
and there's the "Enterprise". 

Now for some REAL magic (well, it 
seems like magic to me). Since A$ con- 
tains the 37 graphics characters and 
cursor-control codes that make up the 
"Enterprise", we don't need the 
DATA statements, VARPTRs, or 
POKEs any more! ! ! They were needed 
to get the graphics into A$, but now 
they can be DELETEd. DELETE 
20-30. Now PRINT A$. . . there's the 
"Enterprise" again. THAT'S the ad- 
vantage of "Super Graphics". Once 
the strings are "packed" with 
graphics, you don't need anything ex- 
cept the "packed" strings. What a sav- 
ing of memory. . . the whole picture is 
stored in 37 bytes (plus a few more for 
A, $, =, and ") !!! 

Now LIST 10. . . garbage!! It looks 
Hke a bad CLOAD. PRINT A$. . . the 
"Enterprise" is STILL in there. The 
line must not be garbage after all, so 
why does it LIST so badly? The com- 
puter uses one byte codes internally 
and 256 possible decimal values (0 to 
255) can be stored in one byte. That 
seems like a lot. . . until you remember 
how many codes the S-80 needs. The 
character set, cursor control codes, 
graphics codes, and space compression 
(TAB) codes all need unique numbers. 
Those 256 values get used up pretty 
fast. 

The Level II BASIC interpreter saves 
memory when storing programs by 
assigning each command and operator 
another one-byte code number (called 
a "token"). When you type a program 
line like 10 PRINT A$, PRINT isn't 
stored in memory as the letters 
P-R-I-N-T. 

continued on page 87 

85 



PROGRAMMING 

HINT 



"Bats", as presented in the June 
SoftSide, is a program begging for 
some sound, so I made the following 
changes and insertions: 



22 DEFINTA-C,E-R,T-Z 

80 l1S$=STRING$(27,191)!S=VftRPTR(MS«)!SS 

=PEEK(S+l)+256tPEEK(S+2):IFSS>32767THEN 

SS=SS-65536 

85 F0RD=SST0SS+26! READN: POKED, Ni NEXTD 

90 IF PE£K(16396)=201 THEN POKE 16526,P 

EEK(S+1)! POKE I6527,PEEK(S+2) ELSE CHD 

"T"! DEFUSRO=SS: POKE 14308,1 

95 DATA 205, 127, 10,77,i8,62, 1,105,211,2 

55,45,32,253,60,105,211,255,45,32,253,1 

3,16,238,175,211,255,201 

1520 PRINT S(I«3)+(Jt64),">V<"j! NT=USR 

(7464) 

1530 PRINT 3(I»3)+(Jt64),"Y0U";: NT=USR 

(80001 

2030 IF Q=72 THEN H=H+1: PRINT8896,"«H 

YPERSPACE»';in=RND(19)!yi=RND(ll)! FO 

R D=0 TO 6: NT=USR(7524)! NEXT Ds GOTO 

2200 

2300 PRINT 3(n»3) + (Yl»64),"Y0U"j!NT=US 

R(8O0O):A(n,YI)=3:G0T0 2400 

2310 PRINT S(Xll3)+(Ylt64),"ZAP"i:F0R D 

=0 TO 59: NT=USfi(5912)! NEXT D:GOTO 400 



2320 PRINT S(Xl«3)+(Yl>64),'BAT"j!F0R D 

=0 TO 9: NT=USR( 19300)! NEXT DsGOTO 400 



2600 PRINT 9(X(I)t3)+(Y(I)»64),">V<"iiN 

T=USR(7464)! A(X(I),Y(I))=2i J=J+li NT= 

USR(7464): GOTO 2700 

2620 X(I)=0!K=K+l!N=(RND(7)+22)t256 + R 

ND(8)+2l! FOR 0=0 TO 13: NT=USR(N)! NEX 

T D!GOTO 2700 

2650 PRINT 3(X(I)«3)+(Y(I)l64),"BIT"i!N 

T=liSR (32000): SOTO 4000 

3000 FOR D=0 TO 4: NT=USR (25800): NEXT 

D!PRINT S896,CHR«(30) SPRINT 8896, "YOU N 

IM"j 



Now you should be able to hear 
those bats fry as they hit the fences! 
Keep up your good work. 



Barry Diller 
Wynnewood, OH 




Direct from TSE HARDSIDE 



NEC 5520 Spin Writer. . (9-5520) $3195.00 
NEC 5510 SpinWriter . . (9-5510) $2795.00 
NEC 5530 SpinWriter . . (9-5530) $2795.00 

CENTRONICS 737 (9-737) $749.00 

OKIDATA Microline-80 . . (9-80) $439.00 
OKIDATA Microline-82 . , . (9-82) $579 00 
OKIDATA Microline-83 . . (9-83) $879.00 

EPSON MX-80 (9-MX80) $509.00 

EPSON MX-80FT .... (9-MX80FT) $619.00 
EPSON MX-100FT . . (9-MX100FT)$829.00 

C.ITOH 25cps Daisey . . (9-WP25) $595.00 
C.ITOH 45cps Daisey. (9-WP45) $1995.00 





NEC Tractor-Feed Option 

(9-5000) $249.00 

BDT Sheet-Feeder 

(NEC only) Option (9-5005) $1495.00 

Microline-80 or 82 Tractor-feed Option 

(9-80-T) $59.00 

Centronics Zip-Pack Ribbons 

(3-pack) (21-01) $15.95 

SpinWriter Multi-Strike Ribbons 

(3) (21 -02) $19.95 

Microline Printer Ribbon 

(3-pack) (21-04)$15.95 

EPSON Printer Ribbons 

(2-pack) (21 -05) $29.95 

RS MOD-I Printer 

(36-pin) Int. Cable (26-1411) $59.00 

C.ITOH Tractor Option. (9-WPT) $189.00 



RS MOD-I Printer 

(40-pin) Int. Cable (26-1416) $59.00 

RS MODI & III Printer 

(36-pin) Cable (26-1401) $29.00 

RS MODI & III Printer 

(40-pin) Cable (26-1415) $29.00 

RS MOD-I & III LRC Printer Cable 

(9-10) $29.00 

APPLE Parallel Int. & Cable 

(36-pin) (47-936) $100.00 

APPLE Parallel Int. & Cable 

(40-pin) (47-940) $100.00 

APPLE Asynchronous RS-232C Int 

(47-771 OA) $159.00 

ATARI-Macrotronics Print 

(36-pin) lnt(36-936) $69.95 

ATARI-Macrotronics Print 

(40-pin) lnt(36-940) $69.95 

TERMS: Prices and specifications are subject to 
change. TSE HARDSIDE accepts VISA & MASTER- 
CARD. Certified checks and Money Orders. Personal 
checks accepted (takes 3 weeks to clear). TSE HARD- 
SIDE payi all shipping charges (within the 48 states) on 
all PREPAID orders over $100.00. On all orders under 
$100 a $2 50 handling charge must be added. COD 
orders accepted (orders over $250 require 25^ deposit), 
there is a $5 00 handling charge. UPS Blue Label and 
Air Freight available at extra cost. 




TS€:IHPRDSID€ 



6 South St , (Gilford, NH 03055 (603)673-5144 
TOLL FREE OUT-OF.STATE 1-800-258-1790 



86 



SoftSide August 1981 



VARPTR Used 

coatinued from page 85 

That would use five bytes of memory. 
No, PRINT is replaced by a one-byte 
"token", the number 178 decimal (B2 
hex), saving four bytes. Humans can't 
read "tokens", so when a line is 
LISTed, BASIC converts the "tokens" 
back to the spelled-out words. 

All weU and good. . . but there are 
125 commands and operators, each of 
which needs a "token". Since one byte 
can only have one of 256 values, and 
most values were in use for graphics 
and so on. . . they ran out of numbers. 
Reasoning that graphics characters and 
TAB codes are meant to be seen on the 
screen, not in LISTings, and com- 
mands and operators will be seen only 
in LISTings, the geniuses at Microsoft 
(sincere flattery! !) felt safe in using the 
SAME numbers for both 
graphics/TAB codes and com- 
mand/operator "tokens". Graphics 
use 128 to 191 decimal and TABs use 
192 to 255, while the "tokens" use 127 
to 251 decimal. If 191 is in memory, 
and PRINTed on the screen, all six pix- 
els of one graphics character are lit — 
our CHR$(191). But if 191 is in 
memory, and LISTed, BASIC 
presumes it's a "token" and expands it 
to "USING" for the LISTing. 

We've put our 37 graphics characters 
into A$ where they can be PRINTed on 
the screen, or LISTed with their pro- 
gram line. When we PRINT A$, we get 
graphics. But when we LIST the line 
with A$, BASIC thinks the numbers 
are "tokens" and expands them to 
their full, readable length for the 
LISTing. Hah. . . we fooled the 
machine. But our LISTing is full of 
TABs, IPs, ENDs, and the other com- 
mand words. It looks terrible, but it 
works fine when PRINTed. 

A LLISTing of "Super Graphics" 
cannot be typed into the computer, 
because it's full of expanded 
"tokens", when what we want to type 
in are the graphics codes POKEd into 
the string. Have your LLISTing con- 
tain the dummy strings, the DATA 
statements, the VARPTR lines, and 
the POKES as it looks before the pro- 
gram is RUN the first time. Include a 
REM statement indicating that the user 
is to type the program in, RUN it to 
"pack the strings", then DELETE the 
lines containing the DATA, 
VARPTRs, and POKEs. The program, 
which now contains the "Super 
Graphics" should be SAVEd to disk or 
CSAVEd to cassette. 

"Super Graphics" are fast, memory 
efficient, and, as you've now seen, easy 
to do. Go draw a picture. Q 



Hardware from TStHRRDSIDC 




TRS-80 Model III, 48K RAM $999 



Computers 



TRS-80 Model III 

16K RAM (#26-1062) $919.00 

TRS-80 Model III 

48K RAM (#26-1062 + ) $999.00 

TRS-80 Model III 

48K, 2 Disk (#26-300) $1995.00 

TRS-80 Color Computer 

4K RAM (#26-3001) $359.00 

TRS-80 Color Computer 

16K RAM (#26-3001 + ) $399.00 

TRS-80 Color Computer 

32K RAM (#26-3001 + + ) $479.00 

TRS-80 Color Computer 

Ext. BASIC (#26-3002) $529.00 

TRS-80 Color Computer 

Ext. BASIC 32K 

(#26-3002 + ) $599.00 



Model I Disk Drives 

HARDSIDE 40-Track Drive 

(#7-40) $299.00 

HARDSIDE 80-Track Drive 

(#7-80) $449.00 

PERCOM Data Separator 

(#7-03) $29.95 

PERCOM Doubler-II 

(#7-07) $149.95 

HARDSIDE Extender Cable 

(#7-02) $15.95 

HARDSIDE 2-Drive Cable 

(#7-04) $29.00 

HARDSIDE 4-Drive Cable 

(#7-05) $39.00 

TRS-80 Color Computer 32K RAM $599 



Model I Peripherals 



COMM-80 Interface 

(#4-80) $159.00 

CHATTERBOX Interface 

(#4-81) $239.00 

DISK-80 Interface 

32K RAM (#4-82) $339.00 

DISK-80 -I- Interface 

32K RAM (#4-83) $395.00 

LYNX Communications Interface 

(#19-80); $229.00 

LYNX Auto-Answer/Auto Dial 

(#19-82) $279.00 

RS Exp. Interface 

32K RAM (#26-1 140-32) $389.00 

16K Memory Kit 

TRS-80 Interface (#5-1 102) $39.00 

ORCHESTRA 80 

(#15-03) $79.95 

Dual Joysticks 

for Color Computer (#26-3008) . . . $24.95 

CTR-80A Cassette Recorder 

with cable (#26-1206) $59.95 

DIGI-TALKER MOD I 

(#4-DTl) $189.00 

DIGI-TALKER MOD III 

(#4-DT2) $189.00 

80-Graphic Board 

(#26-800) $139.00 




TERMS: Prices and specifications are subject to 
change. TSE HARDSIDE accepts VISA & MASTER- 
CARD. Certified checlcs and Money Orders. Personal 
checks accepted (takes 3 weeks to clear). TSE HARD- 
SIDE pays all shipping charges (wllhin the 48 stales) on 
all PREPAID orders over SIOO.OO. On all orders under 
SlOO a S2.50 handling charge must be added. COD 
orders accepted (orders over $250 require 25% deposit), 
there is a S5.00 handling charge. UPS Blue Label and 
Air Freight available at extra cost. 




T5€:HPIRDSID€ 



6 South St, Milford, NH 03055 (603)673-5144 
TOLL FREE OUT-OF-STATE 1 -800-258-1 790 



SoftSide August 1981 



87 




by Edward E. Umlor 

HARDWARE 

I have had several inquiries about 
the Exatron Stringy Floppy. It is now 
available for the Apple as well as the 
S-80. I can only write on the S-80 ver- 
sion, as this is the one that I have used. 

The Stringy Floppy is designed as a 
mass storage device that fills the gap 
between cassettes and disks. It is much 
faster than the cassette (about a minute 
and a half for a 16K program instead 
of over four minutes) and much slower 
than the disk (about 10 seconds for 
16K). The cost of a Stringy wafer (a 
continuous loop device) and a diskette 
is about the same, so the cassette is still 
the least expensive way to go. Money is 
speed and efficiency in this here data 
game. Stringy Floppies can be more 
than one-unit systems and are pat- 
terned more after disks than cassettes. 

There are several similarities 
between the disk and Stringy Floppy 
in handling Assembly Language 
programs. You save the program using 
the first byte location, last byte loca- 
tion, and start location format. When 
the program is loaded, it will auto start 
without having to use the "/"and 
"ENTER". BASIC programs are 
saved in a manner similar to the 
cassette format. I am not going to go 
into detail about the specs of the 
Stringy Floppy. The manufacturer 
does a good job of that in its ads. I 
will, however, touch on some of the 
commands and its compatibility with 
other devices. 

On the S-80 the Stringy Floppy is 
activated by typing SYSTEM 
(ENTER) / 12345 (ENTER). You will 
receive a prompt from the ROM in the 
first (0) Stringy Floppy telling you the 
system is activated. You will now have 
several new commands that you can 
run. The new commands take very lit- 
tle memory as the symbols are all that 
is placed in memory. The subroutines 
are contained in the ROM located in 
the first Stringy Floppy. 

@NEW is the command that is used 
to test, format, and verify a new wafer 
(the "@" is the symbol that triggers 
the new Stringy Floppy ROM com- 
mands). The @ command must be run 
on every new wafer as it sets the BOT 
(beginning of tape) and the EOT (end 
of tape) markers as well as running a 
media check. Many wafers will not 
fully verify, but will still save programs 
without loss of data. 




EXATRON 
STRINGY FLOPPY 



@SAVE # ( # = number of program 
on wafer 1, 2, etc.) is used to save a 
BASIC program on a wafer. 

©LOAD # is used to load a 
BASIC/ Assembly Language program 
from the wafer. 

All the commands have a multiple 
drive format and you will receive 
several useful utilities with the 
package. I would like to address myself 
to the compatibility aspect of the 
Exatron Stringy Floppy. The Stringy 
Floppy hooks into the S-80 on the bus 
expansion port. Yes, you can run one 
directly off the keyboard!! Some of 
you might not be aware of the fact that 
the front connector on the left side of 
the Expansion Interface is a bus expan- 
sion port. The Stringy Floppy is less ex- 
pensive than an E.I. and disk drives, 
but is still fully compatible when you 
do add these goodies. You would then 
be able to select which medium of 
storage you wanted — cassette. Stringy 
Floppy, or disk. I have used ours with 
all three methods hooked up and 
operational, and could transfer files 
between all three. 

Apple owners should have this same 
freedom. Since each option plugs into 
its own output port, I would expect the 
same overall freedom of data transfer- 
ral to be applicable. I would like to get 
one to check out on the Apple, but will 
have to wait for time and funds to 
become available. Larry Baker of Kan- 
sas, I hope this has been of some help 
to you. 

SOFTWARE 

This month's software review will 
probably seem a little brief to some 
people. The old saying — When you 
have seen one disassembler, you have 
seen them all — will apply somewhat to 

So ftSide August 1981 



this piece of software. It is the first 
utility for the S-80 color computer to 
pass across my computer. I am 
speaking of the new offering from In- 
terpro in Manchester, NH. The "Color 
Computer Disassembler" is now in 
production for all you Assembly 
Language persons out there. I know 
you BASIC types could care less what 
is present in the ROMs, but there are 
those who cannot wait to tear into the 
680 BASIC interpreter. 

Well, the day has arrived for you 
assembly types that want to be able to 
call up ROM routines. The format of 
the display/printout from this 
disassembler is based on the tried and 
proven # 1 -address of byte, # 2-hex 
code of address, #3-6809 mnemonic 
for the byte, and # 4-relative jump ad- 
dress if any. The documentation is 
short, but sufficient to get you going in 
good shape. Interpro even warns you 
that the first 32 of the ROM in the 
color computer is a table of addresses 
and will not decode properly. The pro- 
gram is well prompted for the begin- 
ners out there who are just starting to 
get into the catacombs of the Assembly 
Language. I am just getting started 
myself on the Z-80 set. 

The only conclusion that I can make 
is, this utility is a must for the 
Assembly Language person with a 
color computer. I don't know of too 
many people (even if they stay in 
BASIC all the time), who own S-80 
Mod Is, that don't have at least one 
Z-80 disassembler in their library. This 
is the first one that I have seen for the 
6809. 

Well, I guess that about wraps up 
another session of fuss'n'muss in the 
world of newdom. See y'all in 
September. ^ 




by Edward E. Umlor 



Here I is again! It's that time to bend 
the old eyeballs again. I have started to 
receive some mail and I will try to start 
answering it. 

The Apple and MX-80 were the sub- 
jects of a couple of letters compliments 
of Mr. Frank Greene of Hedgesville, 
WV. The system that he wrote about is 
an Apple II with a TYMAC parallel in- 
terface and an MX-80 printer. The 
system displays 40 characters per line 
on the video and also prints 40 
characters per line. To overcome 
the 40 character limitation on the 
printer, strike a CTRL-I (which turns 
off the monitor screen) and 80 N 
(which sets 80 characters per line). 
Another CTRL-I will turn the video 
back on. There is one little problem, 
however. To quote the letter — "By 
the way, the use of these commands 
will elicit a raspberry duet and error 
message from the Apple and printer, 
but such bad manners shouldn't be 
taken personally. Everything works 
fine after they quiet down." This letter 
was soon followed by another one 
which said that his Apple had learned 
some manners. The use of CHR$ to 
output the commands kept peace in the 
family. CHR$(9);80;CHR$(78) will ac- 
complish the same results without the 
backtalk and CHR$(9) will restore the 
video. 

I believe that in an article on pro- 
graming hints for printers, the use of 
CHR$ was mentioned. Here it is not so 
important to set up strings that are 
equal to your control functions, 
although this same method could be 
used in a program for data output. 

While on the subject of the MX 
series of printers, there are several 
things I should pass along at this time. 

The MX-70 is a seven-bit word 
printer and works well as is with the 
Macrotronics cable for the Atari. 
However, this is not so with the several 
cables for the S-80 Interface. Many 
cables sold as the 26-1401 will require 
that pins 31 through 36 be isolated 
(electrical tape does well, so does 
removing the pins from the connector). 
There is a reset line in these top pins 
that is grounded in the interface. The 
low level means reset. 

The MX-80 is an eight-bit word 
printer and works well with the S-80 
Interface. If you want to make full use 
of its capabilities for underscoring, 




etc., you will have to modify the stand- 
ard cable again. Pin 14 of the 36-pin 
connector is held at ground by the in- 
terface. This line allows some com- 
puters to select auto/non-auto Hne 
feed. Leave the dip switches in the 
printer the same as delivered. Isolate 
the wire for pin 14 (it should be the 
eighth wire from the high-numbered 
pin side of the cable). Most cables 
have 34-conductor ribbon cable. Using 
a sharp knife, separate the eighth wire 
from the seventh and ninth. The cut 
should be about two to three inches 
long. Lift the wire up and cut it in the 
middle of the loop that is formed. Strip 
and tin about one-eighth inch on each 
exposed end and solder in a single-pole 
single-throw (SPST) switch. Shack part 
number 275-624 @ $1.59 works well in 
this application. When the switch is in 
the OFF position, the software will 
have to furnish the linefeeds, and in 
the ON position works just like a stan- 
dard S-80 printer. If you are going to 
use the Macrotronics cable for the 
Atari, check pin 9 of the 36-pin con- 
nector for ground. This is the eighth bit 
line and it must be grounded. You can 
tell that as soon as you try to print 
something. If you can only get the 
graphics characters, then pin 9 is not 
grounded. You will not be able to use 
the graphics on the Atari using the 

SoftSide August 1981 



Macrotronics cable as the graphics are 
in the upper 128 codes and you will be 
able to produce only the lower 128 
codes. 

Just one more thing about the 
MX-80 and I will sign off. Epson has 
now furnished us with the parts to fix a 
problem called FUZZY PRINT. This 
usually shows up the worst in the con- 
densed double-strike mode. Here are 
the codes to set up the mode. Your line 
of text to print should be at least 130 
characters long:LPRINTCHR$(15); 
:LPRINTCHR$(27)-l-"G". The 15 is 
condensed mode and the ESC G is for 
double-strike. If your printer does not 
strike cleanly over each line (you 
should print a minimum of one full 
page), contact your nearest Epson war- 
ranty service center or Hardside for the 
fix. There is no charge for parts or 
labor, so don't hesitate to have it done. 
The fix also shortens the BEEP from 
three seconds to about one second 
maximum. You can obtain your nearest 
service center's location from Epson at 
(213) 378-2220, and say HI!! to Laura 
from me. 

Well, that is about all for now from 
the old GRANITE KNOGGIN for this 
time out. It sure is nice to know there 
are other keyboard pounders out there. 
Keep pounding and HAPPY COM- 
PUTING. © 

89 



Connect with ATARI 




Hardware 

ATARI 400 Computer System, 16K RAM $339.00 (#36-40i) 

ATARI 400 Computer System, 32K RAM $519.00 (#36-402) 

ATARI 800 Computer System, 16K RAM $829.00 {#36-8O0) 

ATARI 800 Computer System, 32K RAM $929.00 (#36-801) 

ATARI 800 Computer System, 48K RAM $999.00 (#36-802) 

ATARI 410 Program Recorder $69.00 (#36-803) 

ATARI 810 Disk Drive $499.00 (#36-8io) 

ATARI 822 Thermal Printer $389.00 (#36-820) 

ATARI 825 Printer (80-col) $769.00 (#36-825) 

ATARI 830 Acoustic Modem $179.00 (#36-850) 

ATARI 850 Interface $179.00 (#36-855) 

16K RAM Module for the ATARI $99.00 (#36-854) 

32K RAM Module for the ATARI $169.00 (#36-855) 

MACROTRONICS Printer Interface (36-pin) $69.95 (#36-936) 

MACROTRONICS Printer Interface (40-pin) $69.95 (#36-940) 

ATARI Joystick Controllers $19.95 (#36-3005) 

ATARI Paddle Controllers $19.95 (#36-3004) 

ATARI CX-70 Light Pen $74.95 (#36-70) 

Dust Cover for ATARI 400 $7.95 (#i6-40) 

Dust Cover for ATARI 800 $7.95 (#i6-03) 

ROM programs 

Basketball $29.95 (#36-bask) 

Chess $34.95 {#36-CHS) 

Editor/Assembler $49.95 (#36-ase) 

Music Composer $49.95 (#36-muse) 

Star Raiders $39.95 (#36-strds) 

Super Breakout $34.95 (#36-supb) 

Tele-Link $24.95 (#36-tel) 

3D Tic-Tac-Toe $29.95 (#36-3TTT) 

Video Easel $29.95 (#36-video) 



SOFTWARE on Disk 

VISICALC from Personal Software $199.95 (#36-vicl) 

MAILING LIST $24.95 (#36-279002D) 

SOFTWARE on Cassette 

Star Trek 3.5 $14.95 (#36-20oo25T) 

Deflection/Simon Says $9.95 (#36-20oo78T) 

Mountain Shoot $9.95 (#36-20oo79T) 

Angle Worm/Crolon Diversron $9.95 (#36-200092T) 

Fleet $6.95 (#36-27701 bc) 

Connect Four $6.95 (#35-2770200) 

Letters $6.95 (#35-2770220) 

Reverse $6.95 (#35-2770230) 

Zap $6.95 (#36-2770240) 

Lander $6.95 (#36-2770190) 

Chase $6.95 (#35-2770170) 

Computer Acquire $20.00 (#35-2370020) 

Conflict 2500 $15.00 (#35-2370010) 

Lords of Karma $20.00 (#35-2370010) 

Biorhythms $14.95 (#36-bior) 

Blackjack $14.95 (#36-black) 

Hangman $14.95 (#36-hang) 

Kingdom $14.95 (#36-king) 

3-Dimensional Graphics Package $29.95 (#35-3D-g) 



TERMS: Prices and specifications are suject to change. HARDSIDE ac- 
cepts VISA & MASTERCARD, Certified checks and Money Orders. Personal 
checks accepted (takes 3 weeks to clear). HARDSIDE pays all shipping 
charges (within the 48 states) on all PREPAID orders over $100.00. On all 
orders under $100 a $2.50 handling charge must be added. COD orders ac- 
cepted (orders over $250 require 25% deposit), there is a $5.00 handling 
charge. UPS Blue Label and Air Freight available at extra cost. 



A 




^^B^p ^m4 



ATARr 

A Warner Communicaljuns Compdny^n 



TS€:IHPiRDSID€ 



6 South St ,f^/lilford, NH 03055 (603)673-5144 
TOLL FREE OUT-OF-STATE 1 -800-258-1 790 



At HAYDEN,The Best Has Gotten Better. 

Sargon, the program that came in first in the Creative Computing 
Microcomputer Chess Tournament, has become Sargon II. The game 
has been vastly improved and now has a faster response time. A new 
Level has been incorporated for beginners. The board is easier to 
pre-set and there is now a Hint mode that provides suggestions from 
the computer. Sargon II took on the maxi-computers in the West 
Coast tournament and finished in the money! Shows more thinking 
power than you ever expected. 

SARGON II SPECIALI 20% OFF 

Special 

Sargon II 16K Level II Cassette $29.95 (S-80) $23.95 

Sargon II 24K Cassette Machine Language $29.95 (Apple) $23.95 

Sargon II 32K Disk $34.95 (S-80) $28.95 

Sargon II 48K Disk Machine Language $34.95 (Apple) $28.95 

*offer expires September 15, 1981 



ions 



SoflSide August 1981 



91 




& 



o 




^o 



O^ 



APPL-L-ISP 

from Datasoft, Inc. 

Yet another "big machine" 
language has found its way into the 
micro market. "APP-L-ISP" is the 
first implementation of Lisp for the 
Apple computer, and after several 
hours of experimentation I consider it 
to be a very successful adaptation. 

The package consists of three items: 
the program diskette, the "APP-L- 
ISP" user's manual, and the book, 
LISP, by Patrick Winston and 
Berthold K. P. Horn, both of M.I.T. 
Unlike many other language packages 
you might have used in the past, new 
users of "APP-L-ISP" are expected to 
have at least some exposure to stand- 
ard Lisp. If you aren't familiar with 
Lisp, the text will provide some help. 
The only possible difficulty is that the 
book describes MacLisp, the dialect of 
Lisp developed at M.I.T, and "APP- 
L-ISP" does have some significant dif- 
ferences. Due to these differences, 
learning "APP-L-ISP" will not be as 
easy as learning BASIC. 

The program diskette contains 
several programs. One of these is 
"APP-L-ISP" itself. This is the en- 
vironment in which the Lisp functions 
are created and executed. "APP-L- 
ISP" is loaded upon booting the 
system. Because Lisp is an interpretive 
language like BASIC, this can be 
thought of like running disk BASIC. 

Another program on the diskette is 
the Lisp editor. I've used several main- 
frame Lisp editors and the "APP-L- 
ISP" editor was surprisingly easy to 
use while still maintaining the true 
flavor of a Lisp editor. In fact, many 
of the commands are identical to main- 
frame Lisp editors. After just 15 
minutes I was completely at ease with 
the editor. 

The editor is loaded into "APP-L- 
ISP" by issuing the command: 

(LOAD 'EDITOR) 
Editing is performed on the property 
list of a function. To edit a function, 
the user edits the property list obtained 
with the GETD function. Thus, to edit 
a function named TEST, the user 
would type: 

(EDIT (GETD 'TEST)) 
after LOADing the editor from disk. 

The diskette also contains a MacLisp 
emulator which is obtained with the 
command: 

(LOAD 'MACLISP) 
92 



This emulator permits the use of the 
functions: DELETE, MAPCAR, 
REVERSE, DEFUN, APXMND, 
REMPROP, DEFPROP, APPLY, 
GET, NCONC, FUNCALL, and 
SUBST. 

The Lisp itself is a somewhat 
stripped down version of MacLisp 
with added features applicable to the 
Apple machine. The standard func- 
tions such as CAR, CDR, and CONS 
are present, but other functions you 
may have grown used to using, such as 
NULL, LESSP, and ZEROP, must be 
defined by the user. Fortunately the 
user is supplied with sufficient 
rudimentary functions to make these 
definitions simple. 

"APP-L-ISP" also includes a trace 
package to help debug functions. The 
system also allows the user to direct all 
I/O to a printer to obtain hard copy 
records of functions and their opera- 
tion. The user also has full access to the 
Apple's graphics capabilities. In addi- 
tion to graphics the system features: 

— 16-bit integer arithmetic including 
multiplication, division, and the MOD 
function. 

— PEEK, POKE, and CALL func- 
tions which allow access of up to 650 
machine code routines. 

— A random-number generator. 

— PDL function for game paddle 
input. 

— Debugging facilities including 
BREAK and BAKTRACE. 

As well as those elements already 
discussed, the diskette includes a 
pretty-printing facility in addition to 
two sample programs: "HANOI" 
(The Towers of Hanoi) and "DOC- 
TOR" (described in Winton and 
Horn's text). 

In all, it's an impressive package 
with valuable applications in artificial 
intelligence research in a microcom- 
puter environment. For $124.95 you 
can teach yourself and your Apple a 
new language and actually enjoy the 
experience. 

Mark A. Ohland 

ATARI 3-DIMENSIONAL 

COMPUTER GRAPHICS 

PACKAGE 

from Sebree's Computing 

One of the newest and most rapidly 
expanding fields in programming is the 
realm of computer graphics — 

So ftSide August 1981 



specifically three-dimensional 
graphics. Very few people have the 
hardware and software experience to 
write a good 3-D graphics program. If 
you've ever tried to do so, you can 
appreciate the knowledge required to 
write one of any real significance. The 
complexity of the mathematics and 
programming far exceeds the average 
computer owner's level of training. 
(Unless you're a genius and/or have 
taken a college course in Advanced 
Calculus 3000, and even then it's still 
confusing.) 

This three-dimensional graphics 
package by Tim Hays is just such a 
program (significant, that is, not con- 
fusing). The overall design is a good 
one, although there are some serious 
drawbacks. Its manual, though a little 
hard to read, is detailed enough for the 
average person, and whether you are 
experienced or just want to give it a try, 
there are several experimental pro- 
grams in the back that teach you (and 
your Atari) some new tricks. 

Along with the main graphics data 
base program (called USER. 3D), there 
are four demonstration programs in- 
cluded. The sample 3-D objects pro- 
vided include simple drawings of a 
pyramid and the space shuttle. And of 
course, you can always type in your 
own. 

When entering the data (known as a 
shape table) into the data base for your 
drawing you are asked for the X, Y, 
and Z coordinates of two points — the 
first point (or intersection) to plot, and 
the next point to which the previous 
point will be connected by a straight 
line. Using this method you can 
"build" a three-dimensional shape out 
of the lines to form a kind of "stick 
drawing" which you can then rotate 
and/or view from a different location 
or angle. 

The coordinates X, Y, and Z corre- 
spond to the horizontal and vertical 
position of the point and its 
DISTANCE from you. This means 
that a line (two points) can be drawn 
"pointing" straight at you, and if 
viewed from head on (X = 0, Y = 0, 
Z = 0) it will appear as only ONE point 
because the other point is DIRECTLY 
behind the first. However if you view 
both points from an eastern angle 
(X = 10, Y = 0, Z = 10), they will then 
appear as a normal horizontal line 
because you are now looking at it from 

continued on page 94 



x-uiinii 



by 

Chris Freund 




'6. 



For the thousands who 
have enjoyed X-Wing Fighter, 
X-Wing II presents a totally 
new element in the game! 

You are the pilot of an 
X-Wing fighter .... Your 
Mission, Destroy the Death 
Star! 



i 



Where X-Wing I left Death 
Star looming on the screen, 
X-Wing II lets you guide your 
fighter into the trench, find 
the exhaust port, aim and 
fire — all the while avoiding 
enemy fighters. Excellent 
graphics, 12 levels of play, 
and extensive INKEY$ 
commands make this one of 
our most exciting "real time" 
games. 

S-80 16K Cassette .... $9.95 



sss 





by Roy Groth 




Wish you were a better typist, 
but don't want to take (or pay for) 
a class? Teach yourself to type 
with the aid of your micro- 
computer. With TYPING 
TUTOR you will be quizzed and 
graded, but you set the pace at 
which you learn. TYPING 
TUTOR is a set of programs that 
lets you become as good a typist as 
you wish, allowing you to advance 
from one level to the next when 
you feel comfortable with your 
skills. 

Let "hunt and peck" slip into 
the past, teach yourself speed and 
accuracy on the keyboard with 
TYPING TUTOR. 

S-80/16K/Casstte $15.95 




-5oft5iae, 
Sllecrion5' 

^^^ 6 ^DUlhSlrttt M 



SIrttt Mirrord NH OIOSS 

For Ordars Only 0036730565 



STAR 
TREK 

ALL NEW VERSION! 

by Lance Micklus 



Now with Sound Capability 
and Increased Speed of 

Execution. 

You are In command of the 

starship Enterprise and her 

complement of 371 officers 

and crew. You must enter 

and explore the Omega Vl 

region of the galaxy with its 

192 quadrants containing star 

systems and planets (a few of 

which are habitable). 

Astronomical hazards such as 

pulsars, Class stars, and 

black holes are known to be 

present in the region. Klingon 

battle cruisers are also 

present, so the utmost care is 

needed. 

Star Trek III. 5 includes: 

playboard 8 by 3 by 3 

quadrants; weapons system 

of Phasers and Photon 
Torpedos; Warp and Impulse 
power systems; Science and 
Ship's computers; Long and 

Short Range sensors; 

Damage Control and Status 

reports; and 20 Klingon battle 

cruisers, and 100 stars, 

planets, black holes, and 

pulsars. 

S-80 16K Cassette $14.95 

8-80 32K Disk $14.95 




SoftSidc August 1981 



93 



REVIEWS 

continued from page 92 
a PERPENDICULAR perspective (i.e. 
from the side). 

You can rotate shapes to any angle 
including distance, because if you vary 
the distance of an object, you are really 
varying the ANGULAR DIAMETER 
(i.e. the apparent size of the object 
based on the distance it is from you). 

As I mentioned before, there is a 
selection of tricks for your Atari in- 
cluded in the back of the manual. The 
first is a way of allowing you to get the 
text window on TOP of the screen in- 
stead of the bottom. The others include 
more colors in Hi-Res (Graphics 8), 
mixing the different graphics modes on 
the screen, and even increasing ex- 
ecution speed WITHOUT any hard- 
ware modifications. 

One of the drawbacks is that the pro- 
gram is written in BASIC, and is 
therefore slow at times even with the 
speed-up trick used. A good example 
of this is evident in the AUT0.3D pro- 
gram when the computer is rotating 
four drawings of the space shuttle at 
once. Another drawback is that there is 
no way of saving your data base to tape 
or disk. The instructions tell you to 
write them up in data statements and 



add them to the program, but this is 
quite simply a poor idea and an easy 
way out. There is no reason why a data 
LOAD/SAVE program could not have 
been added to the program package. 
The way it is now, you have to create a 
separate copy of the program con- 
taining your data statements for that 
particular drawing. That is, unless you 
like typing in data over and over again 
or you're just playing around. If you 
make a mistake after it's typed in, you 
have to go back and retype the whole 
thing. Also, this particular 3-D 
package lacks some of the nicer op- 
tions available in packages for other 
types of computers, such as distorting 
the figure; creating a new character set; 
or drawing a design on the screen with 
a joystick or light-pen and saving it to 
tape or disk using multi-colored 
shapes. 

This is a decent program if you want 
to experiment with 3-D graphics and 
learn a little more about your Atari, 
but for a serious graphics application, 
this program just isn't good enough. It 
is, however, the only one I know of as 
of now, but as more software becomes 
available for the Atari, I think we will 
see a more complete system designed 
for the serious user. 

Alan J. Zett O 



f Welcome to . . . 

THE RACES 




THEY'RE OFF! 



Eight horses surge down the track, straining for 
the lead, with your horse struggling in the pack. 

They round the turn and head into the stretch. 
Your horse shoots from behind, catching the lead 
horse. They cross the finish line. 

The Win, Place, and Show horse results are 
printed on the screen, along with each bettor's 
race winnings and total daily winnings. 

You collect your winnings and decide if you want 
just to watch, or bet on the next race, you sludy 
Ihe odds, place your bets, and select the track 
speed— fast (dry), average, or slow (wet). 

The horses are at the starting gate, jumping and 
snorting. You raise the gate, and the next race is 
underway. 

Each horse gallops forward randomly. Spectators 
squirm and shout as they urge their horses to wm. 

You have all the track action and thrills. Plenty of 
winners— and losers! Now you can use your com- 
puter to find out what it takes to win at the track. 
Good Luck! 

Requires 16K Send check, or cfiarge il to Visa 
S-80 Tape~$9.95 or MC. (Print charge number and 
S-80 Disk— $14.95 expiration date— Phone 313-627- 
2877 for charge if you wish) 

WEGIVE IMMEDIATE SERVICE! 

ECHO PRODUCTS INC.. 335 IVULL. ORTONVILLE 

MICH. 48462 

^^DEPT. S Dealer Inquires Invited A 




PC-1211 

Pocket Computer 



DEG RUN •> 

qOO;M::=:.J<p:KHH-E + B) = PRINT H 


E5MJ pocxET coMPuren H 




"•""-"'"•'" i 


r3irJrirfirsnr^rvi(u|r-r)[^rri 


BBBDBI 

^j ^^ ^j ^^ m 

BBBBB 


1 A 1 1 s 1 1 D 1 1 F 1 1 G 1 i-;n 1 J 1 1 K 1 1 L 1 1 = 1 


|z||x||c|1v||b||nI1m| |spc|[I enie. | 




.,.L„..,„i.L.S 


BBBBB 


I <; 



For Engineers, Scientists, Businessnfien 

USE IT WHEREVER YOU GO - IN THE FIELD, CLASS, COMMUTING. 

Handy pockat size: 6 oz., 2 3/4x6 7/8 x 11/16" 

BASIC Language: Most of the features of the Level I TRS-80 microcomputer. Program capacity of 1424 steps. 

Editing Functions: Cursor shifting, Insertion, deletion, line up and down. 

Prerecorded Programs: A growing library of programs Is available on cassette tape. Memory retains data and programs even with the power off. 

Includes: Hard case, long-life batteries. Instruction and Application manuals, BASIC textbool<, two templates, and 90-day Sharp warranty. 

Special Introductory Price $249.00 (Includes shipping). 

BRAND NEW! CE-122 Printer/Cassette Interface 

Use to load prerecorded software, store and save programs. Use to print out programs and calculation records. 

Size: 11 3/32 x 3 3/4 x 1 3/8" (same dimensions with PC-1211 Inserted) 

Printer: 16-digit, 1 line/second, standard paper 

Compatibility: completely compatible with TRS-80 Pocket Computer. 

Includes: Nl-Cd rechargeable battery, AC adapter, carrying case, and cassette cable. 

Price: $'|50.00('n'='u(>Bs shipping) 



To order 
or 
for additional information: 



Combination Price: (PC-1211 plus CE-122) $359.50 (includes shipping) 
Payment by Personal check. Master Charge, or VISA #. Massachusetts residents include 5S Sales Tax. 

Atlantic Northeast Marketino, Inc. 

P.O. Box 921 Dept. SS61 

Marblehead, MA 01945 

617-639-0285 



94 



SoftSide August 1981 



Let our ringers 
do the typing! 



With a SoftSide Disk or Cassette 
subscription you can get each month's TRS-80, 
Apple, or ATARI programs delivered on 
disk or cassette with every issue of your 
SoftSide. No more hours of typing. No hunting 
for typing mistakes. The programs for your 
computer are tested and ready to go the day 
you receive them. 

If you already receive SoftSide magazine, 
you will receive credit for the remainder of 
your subscription toward your new cassette or 
disk subscription. 

Magazine $24/year 

Magazine and Cassette $75/year 

Magazine and Disk $125/year 



Make your SoftSide library complete with back 
issues of SoftSide Apple Edition, SoftSide: S-80 
Edition, and PROG/80. Programs, games, 
complete documentation and lots more! If you 
have missed out on any past issues, now is the 
time to order. 

SoftSide: S-80, and SoftSide: Apple back issues 
(magazine only) $2.50 
PROG/80 back issues $4.00 
Magazine with Cassette programs $9.95 
Magazine with Disk programs $14.95 
New Super SoftSide back issues 
(Magazine Only) 

August or September, 1980 $3.00 
October, 1980 to present $3.50 

For descriptions of the contents of our back 
issues, please see the May, 1981, issue of 
SoftSide. 



■55ft5iae, 
SelecTlonj 

^^^ 4 3oJthSttgot Miirord MM 0305S 
^^^ For Orders Only C03-B73-05aS 



5^^ 



& diskette 



.0P»' 



.t^^^ 



^:~''i^ 



Collectors! Protect your SoftSide 
back issues, Volumes I and II, or 
any publication of your choice, with 
these durable wood grain vinyl 
binders with inside pocket and clear 
spine sleeve for easy identification. 
Holds and protects 12 back issues. 
A regular $4.95 value, SALE priced 
at $3.95. Free (while the supply 
lasts) with the purchase of volume I 
or II (12 issue collection of 
SoftSide). 



Small 
81/2 X11 



$3.95 
$7.95 



%.., 



.•*-#i 



j«»_vsVi 






^O-^V 



SoftSide Selections Order Form 



S80 PROGRAMS 

D APL 16K Cassette (Mod. I only) $14.95 

D APL 32K Disk (Mod. I only) $39.95 

D Lords of Karma 48K Cassette $20.00 

D Pascal 32K Disk (Mod. I only) $99.95 

D Sargon II 

16K Cassette (Mod. I only) $29:9S-$23.95 • 

D Sargon II 

32K Disk (Mod. I only) $34:95$28.95 • 

D Starfighter Cassette (Mod. I/Ill) $24:95 $17.95 ' 

D Starfighter Disk (Mod. I only) $a»:^ $22.95 * 

D Star Trek III.5 16K Cassette $14.95 

n Star Trek III.5 32K Disk $14.95 

D Tiny Comp 16K Cassette $19.95 

D Tiny Comp 32K Disk $24.95 

D Typing Tutor 16K Cassette $15.95 

□ X-Wing II16K Cassette $9.95 

APPLE PROGRAMS 

D Hayden Applesoft Compi ler $209:60 $1 75.00 ♦ 

D Lords of Karma 32K Cassette $20.00 

D Sargon II 24K Cassette $29:95 $23.95 • 

D Sargon II 48K Disk $34:95 $28.95 ' 

D Time Lord 48K Disk $29.95 

OTHER 

D The World of Beysycx $6.95 

n Vinyl Binder (small) $3.95 

D Vinyl Binder (large) $7.95 

ADVENTURE OF THE MONTH 

n Treasure Island Adventure Cassette $5.00 

for the computer 

D Treasure Island Adventure Disk $8.00 

for the computer 

ADVENTURE OF THE MONTH CLUB 

n 6 month Cassette subscription $27.00 

for the computer 

D 6 month Disk subscription $45.00 

for the computer 

SOFTSIDE SUBSCRIPTIONS 

n Magazine only (12 issues) $24.00 

With the SoftSide disk or cassette subscription you get 
not only the magazine, but all the programs in it 
delivered on your choice of media. 

D Magazine and cassette (12 issues) $75.00 

for the computer 

D Magazine and disk (12 issues) $125.00 

for the computer 

D Magazine and disk (one trial issue — next available 

issue will be sent) 

for the computer $19.95 

♦offer expires ADD handling charges $1-50 

Seotember 15 (Foraign ord»r» minimum $10-00 h«ndllnfl) 

Additional charges 

TOTAL 




D 
D 
D 
D 

n 

D 
D 
D 

|n 
in 

(u -^ ^ uj 

o ra w ^ 

f) ' — ' 



"a 



0} 

c 
o 



o 

z 



D 
o 

0) 

x: 
O 

D 



(D 
O) 

CO 

O 






(0 
Q 

d. 

X 
LXJ 



Q. 
N 






(0 

c 
g) 
CO 



E 

(0 

z 



CO 

m 
o 

T3 
•a 
< 



Canada/Mexico Orders 

No C.O.D. to Canada or Mexico. The prefered method of payment Is by Master Card 
or Visa. NO PERSONAL OR COMPANY CHECKS. A banl( check Is acceptable If It 
has been preprinted for payment In U.S. dollars. The handling charge on all 
Canadian or Mexican orders Is $5.00 PLUS actual shipping charges. 

Other Foreign Orders 

Payment must either be by a BANK CHECK drawn on a U.S. bank, payable in U.S. 
dollars or by affiliated bank credit cards of Visa or Master Card. All shipping and 
duty charges are the customer's responsibility. All overseas orders are subject to a 
$10.00 handling charge PLUS actual shipping charges. 

Guarantee 

All software Is guaranteed to load and run. If you experience difficulties with the 
product within 30 days, the tape or disk may be returned. Call (603) 673-0585 or 
673-0586 for a Return Authorization Number. Any returns without a Return 
Authorization Number clearly marked on the outside WILL BE REFUSED. Send your 
properly protected disk or tape to the attention of Customer Service Representative 
with a note Including your name and address. 

Liability 

All software is sold on an as-is basis. SoftSide assumes no liabillty for loss or 
damage caused or alleged to be caused directly or Indirectly by products sold or 
exchanged by them or their distributors, Including, but not limited to, any 
interruption in service, loss of business or anticipatory profits or consequential 
damages resulting from use of operation of such software. 

Prices: 

Prices are subject to change without notice. We are not responsible for 
typographical errors. 



3;it5i'a 





\ons 



6 5outh Strsct Milford NH 03055 
For Orders Only 603-673-0585 



96 




Entertainment Software will 
"^ " never be the same.... 



^<s» 



•^ ' ■ '■>;* 



a revolutionary approach 




Unlock the hidden power 
of your computer for fast and 
easy programming! Use ROIVI 
routines in your BASIC 
and Assembly Language 
Drograms! All you need to 
enow is in... ^~ 



r 





INCLUDES: 

SUPERMAP 

From Fuller'Software ($18.95) 

TRS-80 

DISASSEMBLED 

HANDBOOK 

by Robert Richardson ($10.00) 

HEX MEM 

by John Phillipp 
Monitor written in BASIC 

Z-80 _ 

DISASSEMBLER 

by George Blank 




-55ff5iae. 

fg^^ A 3(iu(h Strwl Hll 



A SoftSide Publication 



Guide to Level II BASIC 
and DOS Source Code 

Description of the contents of the Level II BASIC ROM by 
memory locations, by function, and in lesson format. Includes 
several BASIC and Assembly Language programs in listing 
format to examine and use ROM routines. 



im